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.

78 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. if [ -x /bin/dmesg ]; then
  19. dmesg -n 3
  20. dmesg > /var/log/boot.log
  21. fi
  22. title "Mounting special filesystems"
  23. check mount -n -t proc proc /proc
  24. check mount -n -t sysfs sysfs /sys
  25. check mount -n -t tmpfs tmp /tmp
  26. status
  27. title "Preparing /dev"
  28. check mount -n -t tmpfs udev /dev
  29. check mkdir /dev/pts
  30. check mount -n -t devpts devpts /dev/pts
  31. check cp -a /lib/udev/devices/* /dev
  32. status
  33. title "Starting supervisor"
  34. check start-stop-daemon -S -b -x /usr/bin/runsvdir -- /var/service/
  35. status
  36. # assuming the network module is built-in, start it earlier
  37. for x in $(unet pending); do
  38. title "Starting network (interface:$x)"
  39. check unet $x up
  40. status
  41. done
  42. # wait for udev
  43. while [ ! -d /dev/.udev/ ]; do
  44. sleep 1;
  45. done
  46. # load/blacklist modules
  47. if [ -x /sbin/modprobe -a -n "$modules" ]; then
  48. title "Preloading requested kernel modules"
  49. for x in $(echo "$modules" | tr ':' ' '); do
  50. if expr "$x" : - > /dev/null; then
  51. echo "blacklist ${x#-}" >> /etc/modprobe.conf
  52. else
  53. check modprobe $(echo "$x" | tr ',' ' ')
  54. fi
  55. done
  56. status
  57. fi
  58. title "Triggering coldplug"
  59. check udevtrigger
  60. check udevsettle
  61. status
  62. # and for those which appeared after udevtrigger
  63. for x in $(unet pending); do
  64. title "Starting network (interface:$x)"
  65. check unet $x up
  66. status
  67. done