diff -Nru iscsitarget-1.4.20.3+svn499/debian/changelog iscsitarget-1.4.20.3+svn499/debian/changelog --- iscsitarget-1.4.20.3+svn499/debian/changelog 2017-11-21 18:39:09.000000000 +0000 +++ iscsitarget-1.4.20.3+svn499/debian/changelog 2018-02-01 15:52:55.000000000 +0000 @@ -1,3 +1,10 @@ +iscsitarget (1.4.20.3+svn499-0ubuntu2.5) trusty; urgency=medium + + * Fix daemon dep8 test so it really tests for the running + daemon (LP: #1734855). + + -- Stefan Bader Thu, 01 Feb 2018 16:48:03 +0100 + iscsitarget (1.4.20.3+svn499-0ubuntu2.4) trusty; urgency=medium * Remove compat code for 4.4.0-84 and detect sock_recvmsg signature diff -Nru iscsitarget-1.4.20.3+svn499/debian/tests/daemon iscsitarget-1.4.20.3+svn499/debian/tests/daemon --- iscsitarget-1.4.20.3+svn499/debian/tests/daemon 2017-03-20 23:51:17.000000000 +0000 +++ iscsitarget-1.4.20.3+svn499/debian/tests/daemon 2018-02-01 15:53:25.000000000 +0000 @@ -6,15 +6,28 @@ # modify /etc/default/iscsitarget to enable it CONFIG_FILE=/etc/default/iscsitarget -TMP_CONFIG_FILE=/etc/default/iscsitarget.old -sed -e "s/ISCSITARGET_ENABLE=false/ISCITARGET_ENABLE=true/g" $CONFIG_FILE > $TMP_CONFIG_FILE +TMP_CONFIG_FILE=/etc/default/iscsitarget.$$ + +echo -n "Enable daemon ... " +sed -e "s/ISCSITARGET_ENABLE=false/ISCSITARGET_ENABLE=true/g" \ + $CONFIG_FILE >$TMP_CONFIG_FILE +if [ $? -ne 0 ]; then + echo "FAIL (failed to enable in default config)" + rm -f $TMP_CONFIG_FILE + exit 1 +fi +echo "PASS" mv $TMP_CONFIG_FILE $CONFIG_FILE -/etc/init.d/iscsitarget start >/dev/null 2>&1 -if ps aux | grep -v "grep" | grep -q "iscsitarget" > /dev/null; then - echo "OK" - exit 0 +echo -n "Start daemon ... " +/etc/init.d/iscsitarget restart >/dev/null 2>&1 +sleep 2 + +if ps aux | grep -v "grep" | grep -q "ietd"; then + echo "PASS" else - echo "ERROR: ISCITARGET IS NOT RUNNING" - exit 1 + echo "FAIL (daemon not running)" + exit 1 fi + +exit 0