From b350aad59aa894b19c05d5cbadf26a72419c6469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=A3=D8=AD=D9=85=D8=AF=20=D8=A7=D9=84=D9=85=D8=AD=D9=85?= =?UTF-8?q?=D9=88=D8=AF=D9=8A=20=28Ahmed=20El-Mahmoudy=29?= Date: Mon, 25 Oct 2010 14:03:07 +0200 Subject: Replace 'type' with 'which' to avoid bashism --- debian/bitlbee-common.postinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/bitlbee-common.postinst b/debian/bitlbee-common.postinst index c965e09c..e3e28537 100644 --- a/debian/bitlbee-common.postinst +++ b/debian/bitlbee-common.postinst @@ -15,7 +15,7 @@ BITLBEE_DISABLED=0 BITLBEE_UPGRADE_DONT_RESTART=0 [ -r /etc/default/bitlbee ] && . /etc/default/bitlbee -if [ "$BITLBEE_DISABLED" = "0" ] && type update-inetd > /dev/null 2> /dev/null && +if [ "$BITLBEE_DISABLED" = "0" ] && which update-inetd > /dev/null 2> /dev/null && ( expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null ); then ## Make sure the inetd entry is gone (can still be there from a ## previous version. @@ -70,7 +70,7 @@ fi # works since the debconf code will pick a free port on new installs. if [ "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then unset IS_UPGRADE - if type netstat > /dev/null 2> /dev/null; then + if which netstat > /dev/null 2> /dev/null; then netstat -an | grep -q :$PORT\\b.*LISTEN && IS_UPGRADE=1 else [ -n "$2" ] && IS_UPGRADE=1 -- cgit v1.2.3