]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix "execvp: No such file or directory" in emergency_shell
authorWill Woods <wwoods@redhat.com>
Wed, 14 Mar 2012 21:09:40 +0000 (17:09 -0400)
committerHarald Hoyer <harald@redhat.com>
Thu, 15 Mar 2012 09:20:10 +0000 (10:20 +0100)
Older versions of setsid emit this message on stderr if you try to run
"setsid --help". Redirect it to /dev/null.

modules.d/99base/dracut-lib.sh

index a6c4e24573471dadbb1482722a4d90fb50a474dc..f0d426ccdf61d834aa02fc07e1074ff8ba18713b 100755 (executable)
@@ -814,7 +814,7 @@ emergency_shell()
             _ctty=/dev/$_ctty
         fi
         [ -c "$_ctty" ] || _ctty=/dev/tty1
-        strstr "$(setsid --help)" "control" && CTTY="-c"
+        strstr "$(setsid --help 2>/dev/null)" "control" && CTTY="-c"
         setsid $CTTY /bin/sh -i -l 0<$_ctty 1>$_ctty 2>&1
     else
         warn "Boot has failed. To debug this issue add \"rdshell\" to the kernel command line."