From: Will Woods Date: Wed, 14 Mar 2012 21:09:40 +0000 (-0400) Subject: fix "execvp: No such file or directory" in emergency_shell X-Git-Tag: 018~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cd592dfcb6a5c41ae0dae0b4ec7571fdfa36f92;p=thirdparty%2Fdracut.git fix "execvp: No such file or directory" in emergency_shell Older versions of setsid emit this message on stderr if you try to run "setsid --help". Redirect it to /dev/null. --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index a6c4e2457..f0d426ccd 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -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."