diff -u iscsitarget-0.4.16+svn162/debian/iscsitarget.init iscsitarget-0.4.16+svn162/debian/iscsitarget.init --- iscsitarget-0.4.16+svn162/debian/iscsitarget.init +++ iscsitarget-0.4.16+svn162/debian/iscsitarget.init @@ -19,7 +19,20 @@ # with knowledge about it. MEM_SIZE=1048576 -. /lib/lsb/init-functions +. /lib/lsb/init-functions # log_{warn,failure}_msg +ISCSITARGET_ENABLE=false +ISCSITARGET_DEFAULTS_FILE=/etc/default/iscsitarget +if [ -s "$ISCSITARGET_DEFAULTS_FILE" ]; then + . "$ISCSITARGET_DEFAULTS_FILE" + case "x$ISCSITARGET_ENABLE" in + xtrue|xfalse) ;; + *) + log_failure_msg "value of ISCSITARGET_ENABLE must be either 'true' or 'false';" + log_failure_msg "not starting iscsitarget." + exit 1 + ;; + esac +fi configure_memsize() { @@ -123,7 +136,11 @@ case "$1" in start) - ietd_start + if [ "$ISCSITARGET_ENABLE" = "true" ]; then + ietd_start + else + log_warning_msg "iscsitarget not enabled in \"$ISCSITARGET_DEFAULTS_FILE\", not starting..." + fi ;; stop) ietd_stop @@ -131,7 +148,11 @@ restart|force-reload) ietd_stop sleep 1 - ietd_start + if [ "$ISCSITARGET_ENABLE" = "true" ]; then + ietd_start + else + log_warning_msg "iscsitarget not enabled in \"$ISCSITARGET_DEFAULTS_FILE\", not starting..." + fi ;; status) status_of_proc -p $PID_FILE $DAEMON "iSCSI enterprise target" && exit 0 || exit $? diff -u iscsitarget-0.4.16+svn162/debian/changelog iscsitarget-0.4.16+svn162/debian/changelog --- iscsitarget-0.4.16+svn162/debian/changelog +++ iscsitarget-0.4.16+svn162/debian/changelog @@ -1,3 +1,23 @@ +iscsitarget (0.4.16+svn162-3ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/control: Depend on lsb-base >= 3.2-14. + - debian/prerm: Maintainer script to allow intrepid->jaunty upgrades of + iscsitarget to succeed. + - debian/iscsitarget.init: lsb-ized the entire init script. + + -- Nick Ellery Sun, 21 Dec 2008 13:40:23 -0800 + +iscsitarget (0.4.16+svn162-3) unstable; urgency=medium + + [ Jon Dowland ] + * Add /etc/default/iscsitarget to determine whether to + start the iscsitarget automatically or not. Default to + not (environment might not have the correct module). + Closes: #506099. + + -- Frederik Schüler Wed, 03 Dec 2008 15:07:17 +0100 + iscsitarget (0.4.16+svn162-2ubuntu2) jaunty; urgency=low * debian/iscsitarget.prerm: Maintainer script to allow intrepid->jaunty only in patch2: unchanged: --- iscsitarget-0.4.16+svn162.orig/debian/iscsitarget.default +++ iscsitarget-0.4.16+svn162/debian/iscsitarget.default @@ -0,0 +1 @@ +ISCSITARGET_ENABLE=false