Hide the stderr output of $(initctl version) in init_is_upstart.
authorDidier Raboud <odyx@debian.org>
Sun, 29 Jul 2012 11:41:36 +0000 (13:41 +0200)
committerDidier Raboud <odyx@debian.org>
Sun, 29 Jul 2012 11:41:36 +0000 (13:41 +0200)
Closes: #682032
Reported-By: Michael Biebl <biebl@debian.org>
init-functions

index 0bfea9e90d12534e583dce7b5f7e73a0af350e55..5cb28dc4d2a386bfe858bdb82021baa5ffb410ed 100644 (file)
@@ -264,7 +264,7 @@ get_lsb_header_val () {
 # upstart job, it should generally exit non-zero in this case.
 init_is_upstart()
 {
-   if [ -x /sbin/initctl ] && /sbin/initctl version | /bin/grep -q upstart; then
+   if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | /bin/grep -q upstart; then
        return 0
    fi
    return 1