projects
/
openwrt
/
svn-archive
/
archive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b44c47
)
add workaround for problems with the missing /dev/console
author
Felix Fietkau
<nbd@openwrt.org>
Sat, 3 Feb 2007 12:09:17 +0000
(12:09 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 3 Feb 2007 12:09:17 +0000
(12:09 +0000)
SVN-Revision: 6255
openwrt/package/base-files/default/etc/preinit
patch
|
blob
|
history
diff --git
a/openwrt/package/base-files/default/etc/preinit
b/openwrt/package/base-files/default/etc/preinit
index 3f94442c672e4cdcbd3f16d2886e42fbefa58760..4e21d6605b2f6b3184f4f8ed85a7cf399434d023 100755
(executable)
--- a/
openwrt/package/base-files/default/etc/preinit
+++ b/
openwrt/package/base-files/default/etc/preinit
@@
-4,6
+4,12
@@
. /etc/functions.sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+# the shell really doesn't like having stdin/out closed
+# that's why we use /dev/pty/m0 and m1 as replacement
+# for /dev/console if there's no serial console available
+dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null || \
+ exec </dev/pty/m0 >/dev/pty/m1 2>&0
+
failsafe() {
lock /tmp/.failsafe