Description of problem: /etc/init.d/iscsi script doesn't comply with lsb in "status" function. It can never return 1 because it doesn't do checks for /var/lock/iscsi.pid How reproducible: always Steps to Reproduce: 1. /etc/init.d/iscsi stop 2. touch /var/run/iscsi.pid 3. /etc/init.d/iscsi status Actual results: return value is 2 Expected results: return value is 1 Additional info: This should be fairly easy to do as there already is check to see whether the program is dead and it should be sufficient to add check for /var/run and /var/lock files and return the correct value accordingly.
That is because the iscsi script does not has anything to do with a daemon. There is iscsid which has a separate iscsid script. The iscsi script is for logging into know iscsi targets (targets set to autostart in the /var/lib/iscsi database). What you should do is: /etc/init.d/iscsid stop touch /var/run/iscsid.pid /etc/init.d/iscsid status And then things work as they should. Since the iscsi script does not start any daemon, and since their thus is no pid file, this naturally does not work for the iscsi service.