mirror of the now-defunct rocklinux.org
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.

64 lines
2.0 KiB

  1. #!/bin/bash
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/package/base/sysfiles/stone.sh
  11. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. export SETUPD="${SETUPD:-/etc/stone.d}"
  25. export SETUPG="${SETUPG:-dialog}"
  26. export STONE="`type -p $0`"
  27. if [ "$1" = "-text" ] ; then SETUPG="text" ; shift ; fi
  28. if [ "$1" = "-dialog" ] ; then SETUPG="dialog" ; shift ; fi
  29. if [ "$1" = "-x11" ] ; then SETUPG="x11" ; shift ; fi
  30. . ${SETUPD}/gui_${SETUPG}.sh
  31. if [ "$1" -a -f "${SETUPD}/mod_$1.sh" ]
  32. then
  33. . ${SETUPD}/mod_$1.sh ; shift
  34. if [ -z "$*" ] ; then
  35. main
  36. else
  37. eval "$*"
  38. fi
  39. elif [ "$#" = 0 -a -f ${SETUPD}/default.sh ]
  40. then
  41. . ${SETUPD}/default.sh
  42. elif [ "$#" = 0 ]
  43. then
  44. while
  45. command="gui_menu main 'Main Menu - Select the Subsystem you want to configure'"
  46. while read a b c cmd name ; do
  47. x="'" ; cmd="${cmd//,/ }"
  48. command="$command '${name//$x/$x\\$x$x}'"
  49. command="$command '$STONE ${cmd//$x/$x\\$x$x}'"
  50. done < <( grep -h '^# \[MAIN\] [0-9][0-9] ' $SETUPD/* | sort )
  51. eval "$command"
  52. do : ; done
  53. else
  54. echo
  55. echo "STONE - Setup Tool ONE - ROCK Linux System Configuration"
  56. echo
  57. echo "Usage: $0 [ -text | -dialog | -x11 ] [ module [ command ] ]"
  58. echo
  59. fi