summaryrefslogtreecommitdiffstats
path: root/abs/core/udev/migrate-udev
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/udev/migrate-udev
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core/udev/migrate-udev')
-rw-r--r--abs/core/udev/migrate-udev29
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/core/udev/migrate-udev b/abs/core/udev/migrate-udev
new file mode 100644
index 0000000..a7a24c9
--- /dev/null
+++ b/abs/core/udev/migrate-udev
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# This script will create static system-critical device nodes in your /dev
+# tree so the initscripts can get by without devfs/udev long enough to start
+# up devfs/udev.
+
+STARTDIR=`pwd`
+TMPDIR=`mktemp -d`
+ROOT=/
+[ "$1" != "" ] && ROOT=$1
+
+mount --bind $ROOT $TMPDIR
+cd $TMPDIR
+
+echo -n "creating device nodes: "
+rm -f dev/console
+rm -f dev/null
+rm -f dev/zero
+mknod dev/console c 5 1
+echo -n "console "
+mknod -m 666 dev/null c 1 3
+echo -n "null "
+mknod -m 666 dev/zero c 1 5
+echo -n "zero "
+echo
+
+cd $STARTDIR
+umount $TMPDIR
+rm -rf $TMPDIR