OpenSDE Framework (without history before r20070)
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.

74 lines
2.2 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: target/share/install/rootfs/sbin/init
  6. # Copyright (C) 2006 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. export PATH="/sbin:/bin:/usr/sbin:/usr/bin"
  17. mkdir -p /lib/modules/$( uname -r )
  18. echo -n >> /lib/modules/$( uname -r )/modules.dep
  19. cd /dev ; rm -f fd
  20. ln -sf /proc/kcore core
  21. ln -sf /proc/self/fd fd
  22. ln -sf fd/0 stdin
  23. ln -sf fd/1 stdout
  24. ln -sf fd/2 stderr
  25. cd /
  26. echo "Starting udevd ..."
  27. udevd --daemon
  28. #echo "Running ldconfig ..."
  29. #ldconfig
  30. echo "
  31. OpenSDE installer (2nd stage) ...
  32. This is a small Linux distribution, loaded into your computer's memory.
  33. It includes everything needed to install OpenSDE Linux, restore an old
  34. installation or perform some administrative tasks."
  35. for x in /etc/setup-*.sh /setup/setup.sh ; do
  36. if [ -f "$x" ] ; then
  37. echo ; echo "Running $x ..." ; sh $x
  38. echo "Setup script $x finished."
  39. fi
  40. done
  41. echo -n "
  42. If you use a serial terminal, enter the names of terminal devices to use,
  43. for example '/dev/ttyS0' for the first serial port or just '/dev/console',
  44. just hit enter otherwise. (default=vc/1 vc/2 vc/3 vc/4 vc/5 vc/6): "
  45. read ttydevs
  46. [ -z "$ttydevs" ] && ttydevs="vc/1 vc/2 vc/3 vc/4 vc/5 vc/6"
  47. echo "
  48. Just type 'stone' now, if you want to perform a normal OpenSDE installation"
  49. if type -p dialog > /dev/null ; then
  50. echo "(or type 'stone -text' if you prefer non-dialog based menus)."
  51. else
  52. echo "(only the text interface is available)."
  53. fi
  54. echo -e '#!/bin/sh\ncd ; exec /bin/sh --login' > /sbin/login-shell
  55. chmod +x /sbin/login-shell
  56. for x in $ttydevs ; do
  57. ( ( while : ; do agetty -i 38400 $x -n -l /sbin/login-shell ; done ) & )
  58. done
  59. exec < /dev/null > /dev/null 2>&1
  60. while : ; do sleep 1 ; done