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.

linuxrc 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/sh
  2. #
  3. # floppyfw initfile
  4. #
  5. # nicked from:
  6. # hal91's initfile (/linuxrc), the bootup script of the system
  7. #
  8. VERSION=2.1.6
  9. load_fsmod () {
  10. case $1 in
  11. /dev/hd*)
  12. insmod ide-cd
  13. insmod cdrom
  14. ;;
  15. esac
  16. case $2 in
  17. vfat)
  18. echo vfat support is builtin
  19. ;;
  20. iso9660)
  21. insmod isofs
  22. ;;
  23. esac
  24. }
  25. #
  26. /bin/busybox echo "Booting floppyfw"
  27. PATH="/bin:/sbin:/usr/bin:/usr/sbin"
  28. #PATH="/bin"
  29. TERM=linux
  30. ignoreeof=10
  31. no_exit_on_failed_exec=yes
  32. export PATH TERM ignoreeof
  33. umask 022
  34. /bin/busybox echo "mounting: proc"
  35. /bin/busybox mount -t proc /proc /proc
  36. /bin/busybox echo "Generating links. (Thanks to busybox.lineo.com)"
  37. /bin/busybox --install -s
  38. echo "Generated"
  39. # Modified by Gem, based on coyote distro, changes by Ken Yap
  40. ROOTDEV=`sed -e 's/$/ /' -e 's/.*root=\([^ ]*\) .*/\1/' -e 's/,/ /g' -e 's:/dev/nfs:/dev/fd0:' /proc/cmdline`
  41. set -- $ROOTDEV
  42. # Backward compatibility with a single device argument
  43. if [ $# -eq 1 ]
  44. then
  45. set -- $1 vfat
  46. fi
  47. while [ "$1" -a "$2" ]
  48. do
  49. echo "attempting to mount $1 ($2)"
  50. load_fsmod $1 $2
  51. if mount -t $2 $1 /mnt/tmp
  52. then
  53. echo "mounted $1 on /mnt/tmp"
  54. break
  55. fi
  56. shift; shift
  57. done
  58. [ -f /mnt/tmp/floppyfw/floppyfw.ini ] && cat /mnt/tmp/floppyfw/floppyfw.ini \
  59. | tr -d '\015' >/floppyfw.ini
  60. [ -f /floppyfw.ini ] && chmod 777 /floppyfw.ini
  61. [ -f /floppyfw.ini ] && exec /floppyfw.ini
  62. echo
  63. echo "** floppyfw.ini failed.. starting a shell"
  64. echo
  65. exec sh