Index: iet-0.4.9/etc/initd/initd.debian diff -u iet-0.4.9/etc/initd/initd.debian:1.1 iet-0.4.9/etc/initd/initd.debian:1.2.2.1 --- iet-0.4.9/etc/initd/initd.debian:1.1 Sun Jun 5 17:16:51 2005 +++ iet-0.4.9/etc/initd/initd.debian Mon Jun 6 16:37:53 2005 @@ -55,7 +55,7 @@ modprobe iscsi_trgt start-stop-daemon --start --exec $DAEMON --quiet RETVAL=$? - if [ $RETVAL == "0" ]; then + if [ $RETVAL -eq 0 ]; then echo "succeeded." else echo "failed." @@ -68,7 +68,7 @@ # ugly, but ietadm does not allways provides correct exit values RETURN=`ietadm --op delete 2>&1` RETVAL=$? - if [ $RETVAL == "0" ] && [[ $RETURN != "something wrong" ]]; then + if [ $RETVAL -eq 0 -a ! "$RETURN" = "something wrong" ]; then echo "succeeded." else echo "failed with reason :$RETURN" @@ -78,7 +78,7 @@ echo -n "Stopping iSCSI enterprise target service: " start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE RETVAL=$? - if [ $RETVAL == "0" ]; then + if [ $RETVAL -eq 0 ]; then echo "succeeded." else echo "failed." @@ -90,7 +90,7 @@ modprobe -r iscsi_trgt RETVAL=$? modprobe -r crc32c 2>/dev/null - if [ $RETVAL == "0" ]; then + if [ $RETVAL -eq 0 ]; then echo "succeeded." else echo "failed." @@ -122,13 +122,13 @@ dump) DUMP=`tempfile -p ietd` RETVAL=$? - if [ $RETVAL != "0" ]; then + if [ $RETVAL -ne 0 ]; then echo "Failed to create dump file $DUMP" exit 1 fi ietadm --mode dump --all >$DUMP RETVAL=$? - if [ $RETVAL != "0" ]; then + if [ $RETVAL -ne 0 ]; then echo "Error dumping config from daemon" rm $DUMP exit 1