Idunn is an small system aiming to give an early rescue/install environment with ssh support, making life easier when one doesn't have physical access to machine.
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.

76 lines
1.9 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: target/idunn/initramfs/etc_rc.d_rc.sysinit.sh
  6. # Copyright (C) 2008 The OpenSDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. . /etc/rc.d/functions.in
  16. banner "I am Idunn, take an apple and live forever."
  17. # keep the console clean
  18. [ -x /bin/dmesg ] && /bin/dmesg -n 3
  19. title "Mounting special filesystems"
  20. check mount -n -t proc proc /proc
  21. check mount -n -t usbfs none /proc/bus/usb
  22. check mount -n -t sysfs sysfs /sys
  23. check mount -n -t tmpfs tmp /tmp
  24. status
  25. title "Preparing /dev"
  26. check mount -n -t tmpfs udev /dev
  27. check mkdir /dev/pts
  28. check mount -n -t devpts devpts /dev/pts
  29. check cp -a /lib/udev/devices/* /dev
  30. status
  31. title "Starting supervisor"
  32. check start-stop-daemon -S -b -x /usr/bin/runsvdir -- /var/service/
  33. status
  34. # assuming the network module is built-in, start it earlier
  35. for x in $(unet pending); do
  36. title "Starting network (interface:$x)"
  37. check unet $x up
  38. status
  39. done
  40. # wait for udev
  41. while [ ! -d /dev/.udev/ ]; do
  42. sleep 1;
  43. done
  44. # load/blacklist modules
  45. if [ -x /sbin/modprobe -a -n "$modules" ]; then
  46. title "Preloading requested kernel modules"
  47. for x in $(echo "$modules" | tr ':' ' '); do
  48. if expr "$x" : - > /dev/null; then
  49. echo "blacklist ${x#-}" >> /etc/modprobe.conf
  50. else
  51. check modprobe $(echo "$x" | tr ',' ' ')
  52. fi
  53. done
  54. status
  55. fi
  56. title "Triggering coldplug"
  57. check udevtrigger
  58. check udevsettle
  59. status
  60. # and for those which appeared after udevtrigger
  61. for x in $(unet pending); do
  62. title "Starting network (interface:$x)"
  63. check unet $x up
  64. status
  65. done