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.

69 lines
2.1 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. if type -p dialog > /dev/null ; then
  26. export SETUPG="${SETUPG:-dialog}"
  27. else
  28. export SETUPG="${SETUPG:-text}"
  29. fi
  30. export STONE="`type -p $0`"
  31. if [ "$1" = "-text" ] ; then SETUPG="text" ; shift ; fi
  32. if [ "$1" = "-dialog" ] ; then SETUPG="dialog" ; shift ; fi
  33. if [ "$1" = "-x11" ] ; then SETUPG="x11" ; shift ; fi
  34. . ${SETUPD}/gui_${SETUPG}.sh
  35. if [ "$1" -a -f "${SETUPD}/mod_$1.sh" ]
  36. then
  37. . ${SETUPD}/mod_$1.sh ; shift
  38. if [ -z "$*" ] ; then
  39. main
  40. else
  41. eval "$*"
  42. fi
  43. elif [ "$#" = 0 -a -f ${SETUPD}/default.sh ]
  44. then
  45. . ${SETUPD}/default.sh
  46. elif [ "$#" = 0 ]
  47. then
  48. while
  49. command="gui_menu main 'Main Menu - Select the Subsystem you want to configure'"
  50. while read a b c cmd name ; do
  51. x="'" ; cmd="${cmd//,/ }"
  52. command="$command '${name//$x/$x\\$x$x}'"
  53. command="$command '$STONE ${cmd//$x/$x\\$x$x}'"
  54. done < <( grep -h '^# \[MAIN\] [0-9][0-9] ' \
  55. $SETUPD/mod_*.sh | sort )
  56. eval "$command"
  57. do : ; done
  58. else
  59. echo
  60. echo "STONE - Setup Tool ONE - ROCK Linux System Configuration"
  61. echo
  62. echo "Usage: $0 [ -text | -dialog | -x11 ] [ module [ command ] ]"
  63. echo
  64. fi