]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Mount /proc before including dracut-lib.sh.
authorColin Guthrie <colin@mageia.org>
Sat, 26 Jan 2013 18:13:28 +0000 (18:13 +0000)
committerHarald Hoyer <harald@redhat.com>
Wed, 6 Feb 2013 12:52:30 +0000 (13:52 +0100)
When dracut-lib.sh is sourced it checks the command line (when not using systemd)
as part of the check_quiet() call.

Therefore mount /proc earlier in init.

Avoids the error:

init: 77: /lib/dracut-lib.sh: /proc/cmdline: No such file or directory

modules.d/99base/init.sh

index 0259053a7c6a1d9bc658bae7bb730981e7e3615e..37b59967410b1c4306d59b18cae02b468a947071 100755 (executable)
@@ -17,9 +17,6 @@ OLDPATH=$PATH
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
 export PATH
 
-RD_DEBUG=""
-. /lib/dracut-lib.sh
-
 # mount some important things
 [ ! -d /proc/self ] && \
     mount -t proc -o nosuid,noexec,nodev proc /proc >/dev/null
@@ -37,6 +34,9 @@ if [ "$?" != "0" ]; then
     exit 1
 fi
 
+RD_DEBUG=""
+. /lib/dracut-lib.sh
+
 if [ -x /lib/systemd/systemd-timestamp ]; then
     RD_TIMESTAMP=$(/lib/systemd/systemd-timestamp)
 else