init 545 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # Mount the Linux kernel virtual filesystems
  3. mount none -t proc /proc
  4. mount none -t sysfs /sys
  5. # Ensure devtmpfs is mounted, it must be done manually with initramfs
  6. mount none -t devtmpfs /dev
  7. # Setup PTY infrastructure
  8. mkdir /dev/pts
  9. mount none -t devpts /dev/pts
  10. ifup lo
  11. # Allow for distro or local customizations
  12. if [ -f /etc/rc.local ] ; then
  13. . /etc/rc.local
  14. fi
  15. # Become session leader and try to find a real tty (e.g. ttyS0)
  16. while true; do
  17. setsid cttyhack sh
  18. echo "Console sh exited with $?, respawning..."
  19. sleep 1
  20. done