[Pkg-sysvinit-devel] Bug#567069: /etc/init.d/hostname.sh status always returns 0

jidanni at jidanni.org jidanni at jidanni.org
Wed Jan 27 00:56:08 UTC 2010


Package: initscripts
Version: 2.87dsf-8
Severity: wishlist
File: /etc/init.d/hostname.sh

One notices you do

  status)
	do_status
	echo $?
	;; #...
esac

:


Well, how are you going to return the correct value if you always exit
0? Not only do you need to echo the value, you should exit with it too.

That way, e.g.,
# /usr/sbin/service --status-all
will work correctly.





More information about the Pkg-sysvinit-devel mailing list