summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2009-12-21 23:06:53 +0000
committermaximilian attems <maks@debian.org>2010-03-24 02:39:53 +0100
commit61375f9d9a76a0771b00a32412b7afd296551454 (patch)
tree7d504abd125e737f2b7d15906057abf464396c0e
parentd50ca3a902ad834e2bacc2fe81e053a513b7748e (diff)
downloadinitramfs-tools-61375f9d9a76a0771b00a32412b7afd296551454.tar.gz
initramfs-tools-61375f9d9a76a0771b00a32412b7afd296551454.zip
init: Mount devtmpfs on /dev
falling back to a tmpfs if not supported by the kernel. [ merge of 0.92bubuntu61 ] Signed-off-by: maximilian attems <maks@debian.org>
-rwxr-xr-xinit8
1 files changed, 5 insertions, 3 deletions
diff --git a/init b/init
index e1d4151..68ceac7 100755
--- a/init
+++ b/init
@@ -17,9 +17,11 @@ tmpfs_size="10M"
if [ -e /etc/udev/udev.conf ]; then
. /etc/udev/udev.conf
fi
-mount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev
-[ -e /dev/console ] || mknod -m 0600 /dev/console c 5 1
-[ -e /dev/null ] || mknod /dev/null c 1 3
+if ! mount -t devtmpfs -o mode=0755 none /dev; then
+ mount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev
+ [ -e /dev/console ] || mknod -m 0600 /dev/console c 5 1
+ [ -e /dev/null ] || mknod /dev/null c 1 3
+fi
> /dev/.initramfs-tools
mkdir /dev/.initramfs