mirror of the now-defunct rocklinux.org
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.

42 lines
932 B

  1. #!/bin/sh
  2. echo "$0: $*"
  3. PATH="/bin:/usr/bin:/sbin:/usr/sbin"
  4. export PATH
  5. [ -z "$autoboot" ] && autoboot=0
  6. if [ "$autoboot" -eq 0 ] ; then
  7. echo "Interactive stage 1, spawning /bin/bash. Exit to continue booting..."
  8. /bin/bash
  9. fi
  10. for x in /init.d/*
  11. do
  12. . $x
  13. done
  14. while : ; do
  15. echo "going real..."
  16. if [ -x /real-root/sbin/init ] ; then
  17. #exec /sbin/run_init /real-root /sbin/init
  18. # mount --move /dev /real-root/dev
  19. # mount --move /proc /real-root/proc
  20. # mount --move /sys /real-root/sys
  21. umount -l /dev
  22. umount -l /proc
  23. umount -l /sys
  24. mkdir -p /real-root/branch/irfs
  25. mount --bind / /real-root/branch/irfs
  26. cd /real-root
  27. sed -e "s,/*real-root/*,/,g" /etc/mtab > etc/mtab
  28. exec chroot . sh -c "exec /sbin/init" <dev/console >dev/console 2>&1
  29. elif [ -x /sbin/init ] ; then
  30. exec /sbin/init <dev/console >dev/console 2>&1
  31. fi
  32. echo "no /real-root/sbin/init found. spawning /bin/bash..."
  33. /bin/bash
  34. done