You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
462 B
15 lines
462 B
#!/bin/sh
|
|
# devtmpfs does not get automounted for initramfs
|
|
/bin/mount -t devtmpfs devtmpfs /dev
|
|
|
|
# use the /dev/console device node from devtmpfs if possible to not
|
|
# confuse glibc's ttyname_r().
|
|
# This may fail (E.G. booted with console=), and errors from exec will
|
|
# terminate the shell, so use a subshell for the test
|
|
if (exec 0</dev/console) 2>/dev/null; then
|
|
exec 0</dev/console
|
|
exec 1>/dev/console
|
|
exec 2>/dev/console
|
|
fi
|
|
|
|
exec /sbin/init "$@"
|
|
|