The initscript doesn't work at all - it fails to stop the thing everytime and subsequently fails to start as well, simply because: - it sends SIGHUP to the process, which makes it reload the configuration instead of SIGTERM which would terminate it - it tries to use $PID_FILE variable which is not definied anywhere, so it doesn't remove the pidfile either, plus the "ugly" portion of the script is not necessary at all, since the daemon removes its pidfile just fine once you tell it to terminate instead of reload config. As a result, on repeated /etc/init.d/iscsid start the script seems to "fail" but repeated running instances of /usr/sbin/iscsid keep piling up instead. Patch for 2.0.871-r1 attached.
Created attachment 221933 [details, diff] initscript patch
An additional problem is, if you use AUTOSTARTTARGETS="yes" it will "return $?", then the runscript system thinks that iscsid wasn't started, but the deamon is indeed still running. At that point, we could: - run stop(), disconnect from already connected targets, unload iscsi modules - ignore the error Maybe we could add AUTOSTART="strict" which will run stop(); otherwise the error should be ignored. Opinions?
Created attachment 222547 [details] iscsid-init.d
Created attachment 222549 [details] iscsid-conf.d
Created attachment 222551 [details, diff] iscsid-conf.d.patch
Created attachment 222553 [details, diff] iscsid-init.d.patch
(In reply to comment #2) > Maybe we could add AUTOSTART="strict" which will run stop(); otherwise the > error should be ignored. +1 on this... no need to stop() otherwise. And yeah, good point, the problem you've described is annoying as well.
Created attachment 249972 [details] iscsid-init.d
InCVS.