]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 781: Shell portability
authorAidan Van Dyk <aidan@ifax.com>
Fri, 2 Jun 2006 17:27:22 +0000 (17:27 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Fri, 2 Jun 2006 17:27:22 +0000 (17:27 +0000)
Tim's patch (a more complete version of Giueseppe Sacco
changes the  -a and -o  expressions to use the POSIX form
[ ... ] && [ ... ]
[ ... ] || [ ... ]

13 files changed:
CHANGES
configure
etc/faxaddmodem.sh.in
etc/faxsetup.irix
etc/faxsetup.sh.in
etc/hylafax.in
etc/probemodem.sh.in
port/install.sh.in
util/faxrcvd.sh.in
util/notify-4.1.sh.in
util/notify.sh.in
util/tiff2fax.sh.in
util/wedged.sh.in

diff --git a/CHANGES b/CHANGES
index 580c5f716861e7f0ad1881f64cdc6999d5dcca6f..224c5fb3080db79560fe0cf3e12ab6f59a4a2746 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog since HylaFAX 4.3.0
 
+* Use ] && [ instead of -a for shell portability (2 Jun 2006)
 * Add continuation support to FaxClient in libfaxutil (31 May 2006)
 * Add UseJobTagLine config option for faxsend  (4 Apr 2006)
 
index f6e98e9edb2b07f2f738795904a7bd4a16a9f264..28dbdfed2eb41e1e2e592495cdd7f3730bc6fba4 100755 (executable)
--- a/configure
+++ b/configure
@@ -559,7 +559,7 @@ elif [ "$CONFIG_FILES" ]; then
     REASON=`find $CONFIG_FILES -newer config.cache -print 2>/dev/null`
     test "$REASON" && REASON="$REASON has been updated"
 fi
-if [ "$REASON" -a -f config.cache ]; then
+if [ "$REASON" ] && [ -f config.cache ]; then
    Note "Flushing cached parameters because $REASON."
    Note ""
    rm -f config.cache
@@ -656,11 +656,11 @@ findApp()
 {
     t="$1"; app=$1; path=$2;
     case $app in
-    /*) eval test -x $app  -a  ! -d $app  && { echo $app; return; };;
+    /*) eval test -x $app && test ! -d $app && { echo $app; return; };;
     esac
     IFS=:
     for i in $path; do
-       eval  test -x $i/$app  -a  ! -d $i/$app && { echo $i/$app; return 0; }
+       eval  test -x $i/$app && test ! -d $i/$app && { echo $i/$app; return 0; }
     done
     return 1
 }
@@ -809,7 +809,7 @@ checkGCCVersion()
         if [ ${GCCmajor} -gt $2 ]; then
             return 0
         fi
-        if [ ${GCCmajor} -eq $2 -a ${GCCminor} -ge $3 ]; then
+        if [ ${GCCmajor} -eq $2 ] && [ ${GCCminor} -ge $3 ]; then
             return 0
         fi
     fi
@@ -3271,7 +3271,7 @@ fi
 Note "Done checking TIFF support."
 
 # NB: only check if we have the MLA tools
-if [ -f $SRCDIR/MLA/VERSION -a $DBLIB = no ]; then
+if [ -f $SRCDIR/MLA/VERSION ] && [ $DBLIB = no ]; then
     Note ""
     Note "Checking LIBDB support."
     #
@@ -4035,7 +4035,7 @@ CheckRIP
 
 getGSFonts()
 {
-       if [ ! "$PS" = gs -a -n $PATH_PSRIP ];then
+       if [ ! "$PS" = gs ] && [ -n $PATH_PSRIP ];then
                return 1
        fi
        $PATH_PSRIP -h | $AWK -F '[ ]' '
@@ -4556,7 +4556,7 @@ checkForExecutable()
     test -x $1 || bitchExecutable $1
 }
 
-if [ $QUIET = no -a $INTERACTIVE != no ]; then
+if [ $QUIET = no ] && [ $INTERACTIVE != no ]; then
        Note "Press Return to Continue "
        read ok
 fi
@@ -4929,7 +4929,7 @@ if [ "$MAKEDEPINCLUDE" != "sinclude" ]; then
        DEPEND="$DEPEND html html/tools"
     fi
     test -f $SRCDIR/MLA/VERSION && DEPEND="$DEPEND MLA"
-    test -d $SRCDIR/faxview -a -d faxview && DEPEND="$DEPEND faxview"
+    test -d $SRCDIR/faxview && test -d faxview && DEPEND="$DEPEND faxview"
     for i in $DEPEND; do
        test -f $i/Makedepend || cp /dev/null $i/Makedepend
     done
index 2265d7a1eac089f323b4e31753d3926fa187e5cb..3ef21c7321def89638ed4724fdb756ba1d22a110 100644 (file)
@@ -57,9 +57,9 @@ done
 
 # Test selected modem speed against a list of known standards
 
-if [ "$SPEED" != "" -a "$SPEED" != 38400 -a "$SPEED" != 19200 \
-   -a "$SPEED" != 9600 -a "$SPEED" != 4800 -a "$SPEED" != 2400 \
-   -a "$SPEED" != 1200 ]; then
+if [ "$SPEED" != "" ] && [ "$SPEED" != 38400 ] && [ "$SPEED" != 19200 ] \
+   && [ "$SPEED" != 9600 ] && [ "$SPEED" != 4800 ] && [ "$SPEED" != 2400 ] \
+   && [ "$SPEED" != 1200 ]; then
    cat<<EOF
 
 Warning, you have selected a DTE-DCE communication rate ($SPEED) that
@@ -94,7 +94,7 @@ EOF
 #
 euid=`id|$SED -e 's/.*uid=[0-9]*(\([^)]*\)).*/\1/'`
 test -z "$euid" && euid=`(whoami) 2>/dev/null`
-test -z "$euid" -a -w /dev && euid=root
+test -z "$euid" && test -w /dev && euid=root
 if [ "$euid" != "root" ]; then
     echo "Sorry, but you must run this script as the super-user!"
     exit 1
@@ -248,7 +248,7 @@ EOF
 faxGID=`$GREP "^$PROTOGID:" $GROUP | cut -d: -f3`
 if [ -z "$faxGID" ]; then faxGID=$defPROTOGID; fi
 
-while [ -z "$TTY" -o ! -c /dev/$TTY ]; do
+while [ -z "$TTY" ] || [ ! -c /dev/$TTY ]; do
     test "$TTY" != "" && echo "/dev/$TTY is not a terminal device."
     prompt "Serial port that modem is connected to [$TTY]?"; read TTY
 done
@@ -662,7 +662,7 @@ if [ -f $SCHEDCONFIG ]; then
     echo ""
     getServerParameters $SCHEDCONFIG
 fi
-if [ -f $CONFIG -o -z "$OLDCONFIG" ]; then
+if [ -f $CONFIG ] || [ -z "$OLDCONFIG" ]; then
     OLDCONFIG=$CONFIG
 fi
 if [ -f $OLDCONFIG ]; then
@@ -683,12 +683,12 @@ fi
 isOK()
 {
     x="$1"
-    test -z "$x" -o "$x" = y -o "$x" = yes
+    test -z "$x" || test "$x" = y || test "$x" = yes
 }
 isNotOK()
 {
     x="$1"
-    test -n "$x" -a "$x" != y -a "$x" != yes
+    test -n "$x" && test "$x" != y && test "$x" != yes
 }
 
 #
@@ -742,7 +742,7 @@ EOF
     checkOctalNumber $DeviceMode &&    DeviceMode=$param
     checkForLocalFile $DialStringRules "dial string rules"
     checkFaxNumber;
-    if [ "$TagLineFont" != "" -a "$TagLineFont" != '""' ]; then
+    if [ "$TagLineFont" != "" ] && [ "$TagLineFont" != '""' ]; then
        checkForLocalFile $TagLineFont "tag line font";
     fi
     printServerConfig; prompt "Are these ok [yes]?"; read ok
@@ -1424,7 +1424,7 @@ checkFlowControlAgainstTTY()
 {
     case "$ModemFlowControl" in
     xonxoff|XONXOFF)
-       if [ "$TTY" = ttyf${PORT} -a -c /dev/ttym${PORT} ]; then
+       if [ "$TTY" = ttyf${PORT} ] && [ -c /dev/ttym${PORT} ]; then
            echo ""
            echo "Warning, the modem is setup to use software flow control,"
            echo "but the \"$TTY\" device is used with hardware flow control"
@@ -1438,7 +1438,7 @@ checkFlowControlAgainstTTY()
        fi
        ;;
     rtscts|RTSCTS)
-       if [ "$TTY" = ttym${PORT} -a -c /dev/ttyf${PORT} ]; then
+       if [ "$TTY" = ttym${PORT} ] && [ -c /dev/ttyf${PORT} ]; then
            echo ""
            echo "Warning, the modem is setup to use hardware flow control,"
            echo "but the \"$TTY\" device does not honor the RTS/CTS signals."
@@ -1979,7 +1979,7 @@ EOF
        . $PROMPTS
     fi
     checkForLocalFile $DialStringRules "dial string rules"
-    if [ "$DestControls" != "" -a "$DestControls" != '""' ]; then
+    if [ "$DestControls" != "" ] && [ "$DestControls" != '""' ]; then
        checkForLocalFile $DestControls "destination controls";
     fi
     printSchedulerConfig; prompt "Are these ok [yes]?"; read ok
index f2a46251a491e0dcbe8e2fc53fe2abfdd2c05ebd..f2319e8a84445f5e40e2860248be828fb67bd654 100644 (file)
@@ -63,7 +63,7 @@ ttyDev()
 checkIRIXPort()
 {
     devID="`echo $1 | tr '/' '_'`"
-    if [ -f $CPATH.$devID -a -p $SPOOL/FIFO.$devID ]; then
+    if [ -f $CPATH.$devID ] && [ -p $SPOOL/FIFO.$devID ]; then
        echo "There appears to be a modem already setup on $devID,"
        prompt "is this to be replaced [yes]?"
        read x;
index e8c21cd096e5caddecb428618eee73dcc9f71353..609b6be4ed17a619d93abb6110d1ab338ef0ba37 100644 (file)
@@ -297,7 +297,7 @@ if [ -n "$ac_prev" ]; then
 fi
 
 # if nothing specified on command line, default client+server
-if [ $isClient = no -a $isServer = no ]; then
+if [ $isClient = no ] && [ $isServer = no ]; then
     isClient=yes
     isServer=yes
 fi
@@ -442,7 +442,7 @@ if onServer; then
     # NB: some systems override these function definitions through
     #     per-os faxsetup files
     #
-    if [ -f /bin/passmgmt -o -f /usr/sbin/passmgmt ]; then
+    if [ -f /bin/passmgmt ] || [ -f /usr/sbin/passmgmt ]; then
        addPasswd()
        {
            passmgmt -o -a -c 'Facsimile Agent' -h $4 -u $2 -g $3 $1
@@ -491,7 +491,7 @@ w
 q
 _EOF
        }
-    elif [ -f /usr/sbin/useradd -o -f /etc/useradd ]; then
+    elif [ -f /usr/sbin/useradd ] || [ -f /etc/useradd ]; then
        addPasswd()
        {
            useradd -c 'Facsimile Agent' -d $4 -u $2 -o -g $3 $1
@@ -765,7 +765,7 @@ if onServer; then
        REASON=`find $CONFIG_FILES -newer $DIR_SPOOL/etc/setup.cache -print 2>/dev/null`
        test "$REASON" && REASON="$REASON has been updated"
     fi
-    if [ "$REASON" -a -f $DIR_SPOOL/etc/setup.cache ]; then
+    if [ "$REASON" ] && [ -f $DIR_SPOOL/etc/setup.cache ]; then
        Note "Flushing cached parameters because $REASON."
        Note ""
        rm -f $DIR_SPOOL/etc/setup.cache
@@ -826,7 +826,7 @@ RM="$RMCMD -f"                              # remove file for use below
 #
 euid=`id|$SED -e 's/.*uid=[0-9]*(\([^)]*\)).*/\1/'`
 test -z "$euid" && euid=`(whoami) 2>/dev/null`
-test -z "$euid" -a -w /dev && euid=root
+test -z "$euid" && test -w /dev && euid=root
 if [ "$euid" != "root" ]; then
     bitch "Sorry, but you must run this script as the super-user!"
     boom
@@ -1666,7 +1666,7 @@ addFaxUser()
 isOK()
 {
     x="$1"
-    test -z "$x" -o "$x" = y -o "$x" = yes
+    test -z "$x" || test "$x" = y || test "$x" = yes
 }
 
 if onServer; then
@@ -1790,7 +1790,7 @@ EOF
             true
         fi
     fi
-    if [ -f $INETDCONF -a $HFAXD_SERVER = no ]; then
+    if [ -f $INETDCONF ] && [ $HFAXD_SERVER = no ]; then
        E="hylafax      stream  tcp     nowait  root    $DIR_LIBEXEC/hfaxd      hfaxd -I"
        editInetdConf()
        {
@@ -1821,7 +1821,7 @@ EOF
        }
        eval `$GREP '^hylafax[  ]*stream[       ]*tcp' $INETDCONF | \
            $AWK -F'[   ]+' '{ print "F=" $6 "; U=" $5 }' 2>/dev/null`
-       if [ -z "$F" -a -z "$U" ]; then
+       if [ -z "$F" ] && [ -z "$U" ]; then
            cat<<EOF
 
 
@@ -1835,7 +1835,7 @@ style init program.
 
 EOF
            prompt "Should an entry be added to $INETDCONF [no]?"; read x
-           if [ "$x" = y -o "$x" = yes ]; then
+           if [ "$x" = y ] || [ "$x" = yes ]; then
                echo "$E" >>$INETDCONF;
                signalINETD=yes
            fi
@@ -1869,7 +1869,7 @@ EOF
                isOK "$x" && editInetdConf
            fi
        fi
-    elif [ ! -f $INETDCONF -a $HFAXD_SERVER = no ]; then
+    elif [ ! -f $INETDCONF ] && [ $HFAXD_SERVER = no ]; then
        cat<<EOF
 
 
@@ -1891,7 +1891,7 @@ fi
 #
 if onServer; then
     x=`(ypcat -k aliases) 2>/dev/null | $GREP -i '^faxmaster'` 2>/dev/null
-    if [ -z "$x" -a -f $ALIASES ]; then
+    if [ -z "$x" ] && [ -f $ALIASES ]; then
        x=`$GREP -i '^faxmaster' $ALIASES`
     fi
     if [ -z "$x" ]; then
@@ -2140,7 +2140,7 @@ EOF
 isNotOK()
 {
     x="$1"
-    test "$x" != y -a "$x" != yes
+    test "$x" != y && test "$x" != yes
 }
 
 CONFIG=$DIR_SPOOL/etc/config           # faxq config file
@@ -2196,7 +2196,7 @@ EOF
                . $PROMPTS
            fi
            checkForLocalFile $DialStringRules "dial string rules"
-           if [ "$DestControls" != "" -a "$DestControls" != '""' ]; then
+           if [ "$DestControls" != "" ] && [ "$DestControls" != '""' ]; then
                checkForLocalFile $DestControls "destination controls";
            fi
            printSchedulerConfig; prompt "Are these ok [yes]?"; read ok
@@ -2329,7 +2329,7 @@ EOF
        fi
     fi
 
-    if [ "$FAXQ" -o "$FAXD" ]; then
+    if [ "$FAXQ" ] || [ "$FAXD" ]; then
        cat<<EOF
 
 FATAL ERROR: Old server processes still running!
@@ -2369,7 +2369,7 @@ EOF
     fi
 
     DEVS="`cd $DIR_SPOOL/etc; echo config.*`"
-    if [ -z "$DEVS" -o "$DEVS" = 'config.*' ]; then
+    if [ -z "$DEVS" ] || [ "$DEVS" = 'config.*' ]; then
        cat<<EOF
 
 You do not appear to have any modems configured for use.  Modems are
@@ -2383,7 +2383,7 @@ EOF
        DEVS="`cd $DIR_SPOOL/etc; echo config.*`"
     fi
 
-    if [ -n "$DEVS" -a "$DEVS" != 'config.*' ]; then
+    if [ -n "$DEVS" ] && [ "$DEVS" != 'config.*' ]; then
        FAXGETTY="`findproc faxgetty`"
        if [ "$FAXGETTY" ]; then
            cat<<EOF
index b5face849a6d4f1622638e26b02872c29cb30b05..e18b834cdd8f26de2cc8078e95d123ce0bbd8d36 100755 (executable)
@@ -173,7 +173,7 @@ case $1 in
                fi
                $HFAXD ; printf "$HFAXMSG"
             fi
-           if test $FAXQ_SERVER != yes -a $HFAXD_SERVER != yes ; then
+           if test $FAXQ_SERVER != yes && test $HFAXD_SERVER != yes ; then
                printf " not started (script disabled by configure)"
            fi
            $ECHO "."
index b11c376f6afb9d5124d4ecd171ad4a8c124a0e49..17950fa4b5e9119ef2ec383fa332fc30b6ce6efb 100644 (file)
@@ -91,7 +91,7 @@ SVR4UULCKN=$LIBEXEC/lockname  # SVR4 UUCP lock name construction program
 ONDELAY=$LIBEXEC/ondelay       # prgm to open devices blocking on carrier
 CAT="$CAT -u"                  # something to do unbuffered reads and writes
 
-while [ -z "$TTY" -o ! -c /dev/$TTY ]; do
+while [ -z "$TTY" ] || [ ! -c /dev/$TTY ]; do
     if [ "$TTY" != "" ]; then
        echo "/dev/$TTY is not a terminal device."
     fi
index a6785a26eae5772c3a70c7082c280b4359827808..c72fc9eadecada11db5898ca4bc2675c7644ce64 100644 (file)
@@ -184,16 +184,16 @@ do_chXXX()
 install()
 {
     src=$1 target=$2
-    if [ $RemoveFirst = yes -a -f $target ]; then
+    if [ $RemoveFirst = yes ] && [ -f $target ]; then
        $VERBOSE "$RM $target"
        $RM $target
     fi
-    if [ $SaveFirst = yes -a -f $target ]; then
+    if [ $SaveFirst = yes ] && [ -f $target ]; then
        bf=`echo $src | @SED@ 's;.*/;;'`
        $VERBOSE "$MV $target $ROOT/$DESTDIR/OLD$bf"
        $MV $target $ROOT/$DESTDIR/OLD$bf
     fi
-    if [ -z "$SRC" -a $HasSource = yes ]; then
+    if [ -z "$SRC" ] && [ $HasSource = yes ]; then
        $VERBOSE "$CMD $preopts $src $target $postopts"
        $CMD $preopts $f $target $postopts
     elif [ $SaveFirst = no ] && objectExists $target; then
@@ -211,7 +211,7 @@ install()
        fi
        $VERBOSE "$CHMOD $target"
        do_chXXX $CHMOD $target
-       if [ $STRIP != ":" -a -x $ROOT$DESTDIR$f ]; then
+       if [ $STRIP != ":" ] && [ -x $ROOT$DESTDIR$f ]; then
            $STRIP $target >/dev/null 2>&1 || true
            $VERBOSE "$STRIP $target"
        fi
@@ -231,7 +231,7 @@ if [ $Suggested = yes ]; then
     for f in $TARGETS; do
        t=$ROOT$DESTDIR$f
        if [ -f $t ]; then
-           if [ -z "$SRC" -a $HasSource = yes ]; then
+           if [ -z "$SRC" ] && [ $HasSource = yes ]; then
                $CMP -s $f $t || {
                    $ECHO "*** Warning, target has local changes, installing $f as $t.N"
                    install $f $t.N;
@@ -260,7 +260,7 @@ elif [ $Updated = yes ]; then
     for f in $TARGETS; do
        t=$ROOT$DESTDIR$f
        if [ -f $t ]; then
-           if [ -z "$SRC" -a $HasSource = yes ]; then
+           if [ -z "$SRC" ] && [ $HasSource = yes ]; then
                $CMP -s $f $t || $MV $t $t.O
            else
                $CMP -s $SRC $t || $MV $t $t.O
index 8601969f125c6f39de5ad1e5c29da7ba64ba739b..62392e97367731875ea9837d8b21aa7108e8961d 100644 (file)
@@ -165,7 +165,7 @@ if [ -f $FILE ]; then
        errors)         NOTIFY_FAXMASTER=no;;
        *)              NOTIFY_FAXMASTER=yes;;
     esac
-    if [ "$TOADDR" != "$SENDTO" -a "$NOTIFY_FAXMASTER" != "no" ]; then
+    if [ "$TOADDR" != "$SENDTO" ] && [ "$NOTIFY_FAXMASTER" != "no" ]; then
        (echo "Mime-Version: 1.0"
         echo "Content-Type: text/plain; charset=$CHARSET"
         echo "Content-Transfer-Encoding: quoted-printable"
index 75b158a6bbc8cee8d0e3df197378e19b1f251708..d5cc417fd171c084b24d24809d6c6f44ff5cb3e2 100644 (file)
@@ -32,7 +32,7 @@
 #
 # Return mail to the submitter of a job when notification is needed.
 #
-if [ $# != 3 -a $# != 4 ]; then
+if [ $# != 3 ] && [ $# != 4 ]; then
     echo "Usage: $0 qfile why jobtime [nextTry]"
     exit 1
 fi
index 4cb45bba67b3ab2a6308165302444d880e09c195..4f1c8ae84ea1cda79e8cb789728ac11b310f3e8f 100644 (file)
@@ -36,7 +36,7 @@
 #
 # Return mail to the submitter of a job when notification is needed.
 #
-if [ $# != 3 -a $# != 4 ]; then
+if [ $# != 3 ] && [ $# != 4 ]; then
     echo "Usage: $0 qfile why jobtime [nextTry]"
     exit 1
 fi
@@ -566,11 +566,11 @@ returnToSender()
     if [ -n "$commid" ] ; then
         printItem "%s" "$DICTCOMMID" "$commid"
     fi
-    if [ "$modem" != "any" -a "$RETURNTECHINFO" = "yes" ] ; then
+    if [ "$modem" != "any" ] && [ "$RETURNTECHINFO" = "yes" ] ; then
         printItem "%s" "$DICTMODEM" "$modem"
     fi
     printItem "%s" "$DICTSUBMITTEDFROM" "$client"
-    if [ "$jobtype" = "facsimile" -a "$RETURNTECHINFO" = "yes" ] ; then
+    if [ "$jobtype" = "facsimile" ] && [ "$RETURNTECHINFO" = "yes" ] ; then
         printItem "%u (mm)" "$DICTPAGEWIDTH" "$pagewidth"
         printItem "%.0f (mm)" "$DICTPAGELENGTH" "$pagelength"
         printItem "%.0f (lpi)" "$DICTRES" "$resolution"
@@ -587,7 +587,7 @@ returnToSender()
         printItem "%u ($DICTTOTALPAGES)" "$DICTTOTPAGES" "$totpages"
         printItem "%u ($DICTATTEMPTSPAGE)" "$DICTATTEMPTS" "$ntries"
         printItem "%u ($DICTDIRNEXTPAGE)" "$DICTDIRNUM" "$dirnum"
-        if [ $nfiles -gt 0 -a "$RETURNTECHINFO" = "yes" ] ; then
+        if [ $nfiles -gt 0 ] && [ "$RETURNTECHINFO" = "yes" ] ; then
             printBanner "$DICTDOCSSUBMITTED"
             eval echo "$DICTDOCSTEXT1"
             eval echo "$DICTDOCSTEXT2"
@@ -626,7 +626,7 @@ returnToSender()
                 printf "%15s\n" "$DICTPIN" $pin
             done
         fi
-        if [ $nfiles -ne 0 -a -s $files_0 ] ; then
+        if [ $nfiles -ne 0 ] && [ -s $files_0 ] ; then
             printBanner "$DICTMESSAGETEXT"
             cat $files_0
         fi
@@ -763,7 +763,7 @@ if [ "$WHY" = "done" ] ; then
         printItem "%s" "$DICTCOMMID" "c$commid"
         printf "\n$DICTPROCESSINGTIME %s.\n" "$JTIME"
     fi
-    if [ -n "$faxstatus" -a "$RETURNTRANSCRIPT" = "yes" ] ; then
+    if [ -n "$faxstatus" ] && [ "$RETURNTRANSCRIPT" = "yes" ] ; then
         # use -e in echo to interpret escape characters in faxstatus
        echo "$DICTADDITIONALINFO"
        printStatus "     $faxstatus"
index 510b629b6a96bf332a20f3bab4896571bf5045c9..119951a5289b073477fe655b715f29b9452f10fd 100644 (file)
@@ -140,7 +140,7 @@ OK)                         # no conversion needed
 REFORMAT)                      # only need format conversion (e.g. g4->g3)
     $TIFFCP -i -c $df -f lsb2msb -r 9999 $fil $out
     # libtiff 3.5.7 gives exit status 9 when there are unknown tags...
-    if [ $? != 0 -a $? != 9 ]; then {
+    if [ $? != 0 ] && [ $? != 9 ]; then {
        $CAT<<EOF
 Unexpected failure converting TIFF document; the command
 
index 338c8ad65b0507450a94b16a573c2954af55b5b3..726f1d90e4cb399c29cb290d197e7fbbb66fb2cd 100644 (file)
@@ -187,7 +187,7 @@ EOF
     # Disable faxgetty
     # NB: this is for an System V-style system.
     #
-    if [ -f /etc/inittab -a -n "$WEDGED_DISABLE_FAXGETTY" ]; then
+    if [ -f /etc/inittab ] && [ -n "$WEDGED_DISABLE_FAXGETTY" ]; then
        ed - /etc/inittab<<EOF
 /^[^#].*:respawn:.*faxgetty .*$tty/s/respawn/off/
 w