init 613 B

123456789101112131415161718
  1. #!/bin/sh
  2. export PATH=/bin:/sbin:/usr/bin:/usr/sbin
  3. mount -nt proc proc /proc
  4. mount -o nosuid,nodev,noexec -t sysfs sysfs /sys
  5. mount none /tmp -t tmpfs -o size=2M
  6. mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
  7. mount -o nosuid,size=64k,mode=0755 -t tmpfs mdev /dev
  8. mkdir /dev/pts /dev/shm
  9. mount -o nosuid,noexec -t devpts devpts /dev/pts
  10. exec 0<>/dev/console >&0 2>&0
  11. echo >/dev/mdev.seq
  12. echo "/sbin/mdev" >/proc/sys/kernel/hotplug
  13. mdev -s
  14. mount -o remount,rw /
  15. cat /etc/.rnd >/dev/urandom 2>&1
  16. [ -f /etc/fstab ] && mount -a
  17. [ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;}
  18. exec /sbin/init