[Pkg-iscsi-maintainers] Bug#758532: open-iscsi: remove erronous failed message

Powers, Joshua joshua.powers at hp.com
Mon Aug 18 15:17:33 UTC 2014


Package: open-iscsi
Version: 2.0.873+git0.3b4b4500-2
Severity: wishlist
Tags: patch

When open-iscsi is installed, but does not have anything configured the user will see an unnecessary error message:
"[FAIL] Mounting network filesystems: failed!"

The patch below removes this message by determining if we ever attempted to mount something. If we did not then the message will no longer appear.

Thanks for considering the patch,
Josh

--- debian/open-iscsi.init    2014-08-11 14:37:43.784410000 +0000
+++ debian/open-iscsi.init    2014-08-11 14:38:47.388410000 +0000
@@ -126,6 +126,7 @@ 
 	# Now let's mount
 	log_daemon_msg "Mounting network filesystems"
 	MOUNT_RESULT=1
+	MOUNT_ATTEMPT=0
 	fs=
 	grep -w _netdev /etc/fstab | \
 	    while read DEV MTPT FSTYPE OPTS REST; do
@@ -150,6 +151,7 @@ 
 	    done | \
 	    while read fs; do
 		set -- $(eval echo "$fs" | sed 's@:@ @')
+		MOUNT_ATTEMPT=1
 		case "$1" in
 		    swap)
 			swapon $2
@@ -168,7 +170,7 @@ 
 
 
 
-	log_end_msg $MOUNT_RESULT
+	log_end_msg $((MOUNT_RESULT * MOUNT_ATTEMPT))
 }
 
 starttargets() {



More information about the Pkg-iscsi-maintainers mailing list