summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-07-27 11:14:05 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-07-27 11:14:05 +0200
commit837188c702e62f8f9a0fd36d10c3b19685ffd851 (patch)
tree8991d8966d3a82fd75694244d89edcb5de6ce1cb /package/base-files
parent71bb2494ff48192c10c345062f2e0d051fe9109e (diff)
reimplement cryptinit as shell script
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/src/init6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/base-files/src/init b/package/base-files/src/init
index c1016cc34..a3232cb9c 100755
--- a/package/base-files/src/init
+++ b/package/base-files/src/init
@@ -10,13 +10,15 @@ mount -o nosuid,nodev,noexec -t sysfs sysfs /sys
mount tmpfs /tmp -t tmpfs -o nosuid,nodev,mode=1777,size=${size}k
}
mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
-mkdir /dev/pts /dev/shm
+[ -d /dev/pts ] || mkdir /dev/pts
+[ -d /dev/shm ] || mkdir /dev/shm
mount -o nosuid,noexec -t devpts devpts /dev/pts
exec 0<>/dev/console >&0 2>&0
echo >/dev/mdev.seq
echo "/sbin/mdev" >/proc/sys/kernel/hotplug
mdev -s
cat /etc/.rnd >/dev/urandom 2>&1
+[ -x /cryptinit ] && { /cryptinit; exec switch_root /mnt "/init";}
[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} || mount -o remount,rw /
-[ -f /etc/fstab ] && { fsck -p >/dev/null ; mount -a; }
+[ -f /etc/fstab ] && { fsck -p >/dev/null; mount -a;}
exec /sbin/init