[Pkg-sysvinit-devel] Bug#365062: initscripts: running /etc/init.d/hostname.sh as non-root does not return errorcode

Petter Reinholdtsen pere at hungry.com
Fri Jul 14 11:27:26 UTC 2006


tags 365062 + pending patch
thanks

I agree that the hostname script should return an error code when it
fails.  I believe this patch solve the issue, and have commited it to
svn.  It will be included in the next upload.

Index: debian/initscripts/etc/init.d/hostname.sh
===================================================================
--- debian/initscripts/etc/init.d/hostname.sh   (revisjon 786)
+++ debian/initscripts/etc/init.d/hostname.sh   (arbeidskopi)
@@ -31,6 +31,7 @@
        hostname "$HOSTNAME"
        ES=$?
        [ "$VERBOSE" != no ] && log_action_end_msg $ES
+       exit $ES
 }

 case "$1" in




More information about the Pkg-sysvinit-devel mailing list