summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2007-03-11 22:10:17 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2007-03-11 22:10:17 +0000
commitf07ae7f3f3af57ba453997d3521ba262b8bc0f53 (patch)
treebdfd3263386467323bb6d70202841441ca15830f /generic
parentcea7b8e6cc3ea5d19de794ba30ccd8d0d54752a1 (diff)
downloadptxdist-f07ae7f3f3af57ba453997d3521ba262b8bc0f53.tar.gz
ptxdist-f07ae7f3f3af57ba453997d3521ba262b8bc0f53.tar.xz
* init: this may avoid the 'cp -a /dev/{console,null}' hackery
with root permissions git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7054 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'generic')
-rwxr-xr-xgeneric/sbin/init16
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/sbin/init b/generic/sbin/init
new file mode 100755
index 000000000..fa4bba1b4
--- /dev/null
+++ b/generic/sbin/init
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# This init script makes sure we have /dev/console and /dev/null, no matter
+# if we boot from flash or NFS
+
+mount -t tmpfs none /dev -o mode=755
+
+mknod /dev/console c 5 1
+chmod 600 /dev/console
+mknod /dev/null c 1 3
+chmod 666 /dev/null
+
+# FIXME: this still gives a "unable to open initial console" warning
+
+exec /bin/busybox init $@ 1> /dev/console 2> /dev/console < /dev/console
+