aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-08-30 21:11:39 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2008-08-30 21:11:39 -0500
commit119b8df1fb1258231750309f01e747e72f382493 (patch)
treebbe13ae583240301d4157d2984a42d0aa6e7b5f5 /rc.sysinit
parentd2ae38c8b06d057c7593b7ba836bf24a1f8f6c4f (diff)
downloadinitscripts-119b8df1fb1258231750309f01e747e72f382493.tar.xz
Create udev required device nodes if missing
Udev requires /dev/console, /dev/null, and /dev/zero to exist before running. Create these on init if they're missing Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit5
1 files changed, 5 insertions, 0 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 6ac22c4..dc88be7 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -75,6 +75,11 @@ if [ -x /sbin/udevadm -a -d /sys/block ]; then
# We have udev and /sys appears to be mounted, use UDev
#status "Starting UDev Daemon" /etc/start_udev init
+ #Create these required device nodes if they're missing
+ [ -f /dev/console ] || /bin/mknod /dev/console c 5 1
+ [ -f /dev/null ] || /bin/mknod -m 666 /dev/null c 1 3
+ [ -f /dev/zero ] || /bin/mknod -m 666 /dev/zero c 1 5
+
stat_busy "Starting UDev Daemon"
/sbin/udevd --daemon
stat_done