OpenSDE Packages Database (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.

47 lines
1.4 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../sysvinit/stone_mod_init.sh
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  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. # --- T2-COPYRIGHT-NOTE-END ---
  15. #
  16. # [MAIN] 85 init System Init Configuration
  17. write_config() {
  18. cp /etc/inittab{,.new}
  19. sed s/.:initdefault/$rl:initdefault/ /etc/inittab.new > /etc/inittab
  20. rm -f /etc/inittab.new
  21. }
  22. set_rl() {
  23. gui_menu default_runlevel "Select the default runlevel (Current: $rl)" \
  24. '1 ... Single user mode' 'rl=1' \
  25. '2 ... Multi user mode without network' 'rl=2' \
  26. '3 ... Multi user mode (normal operation)' 'rl=3' \
  27. '4 ... Custom use' 'rl=4' \
  28. '5 ... Multi user mode with graphical login manager' 'rl=5'
  29. write_config
  30. }
  31. main() {
  32. while
  33. rl=`grep initdefault /etc/inittab | cut -d : -f2`
  34. gui_menu gpm 'System Init Configuration.
  35. Select an item to change the value:' \
  36. "Default runlevel... $rl" 'set_rl' \
  37. '' '' \
  38. 'Edit the /etc/inittab file' \
  39. "gui_edit 'The inittab file' /etc/inittab"
  40. do : ; done
  41. }