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.

86 lines
2.4 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/sparc/silo/stone_mod_silo.sh
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  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; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. #
  23. # [MAIN] 70 silo SILO Boot Loader Setup
  24. create_silo_conf() {
  25. rootdev="`grep '^/dev/.* / ' /etc/fstab | tr ' ' '\t' | cut -f1`"
  26. cat << EOT > /etc/silo.conf
  27. timeout=40
  28. default=rock
  29. image[sun4c,sun4d,sun4m]=/boot/vmlinux32.gz
  30. label=rock
  31. root=$rootdev
  32. read-only
  33. image[sun4u]=/boot/vmlinux64.gz
  34. label=rock
  35. root=$rootdev
  36. read-only
  37. EOT
  38. gui_message "This is the new /etc/silo.conf file:
  39. $( cat /etc/silo.conf )"
  40. }
  41. install_silo() {
  42. if [ -n "`ls -l /dev/discs/disc0 | grep scsi`" ] ; then
  43. # Ultra 30 and many more...
  44. DEV="sda";
  45. else
  46. # IDE - by default this is slave, but let's check...
  47. if [ -n "`ls -l /dev/discs/disc0 | grep bus0`" ] ; then
  48. DEV="hda";
  49. else
  50. DEV="hdc";
  51. fi
  52. fi
  53. echo "Creating symlinks for /dev/$DEV - silo doesn't do devfs yet."
  54. ln -s /dev/discs/disc0/disc /dev/$DEV
  55. for i in /dev/discs/disc0/part* ; do
  56. PARTNO=`echo $i | sed -e 's,/dev/discs/disc0/part,,'`
  57. echo "Creating symlink $i -> /dev/$DEV$PARTNO"
  58. ln -s $i /dev/$DEV$PARTNO
  59. done
  60. if silo ; then
  61. echo "SILO installed succesfully" ;
  62. else
  63. echo "SILO install failed!" ;
  64. fi
  65. }
  66. main() {
  67. while
  68. gui_menu silo 'SILO Boot Loader Setup' \
  69. '(Re-)Create default /etc/silo.conf' 'create_silo_conf' \
  70. '(Re-)Install SILO in the Bootblock of /dev/discs/disc0/disc' \
  71. 'gui_cmd "Installing SILO in Bootblock..." "install_silo"' \
  72. "Edit /etc/silo.conf" \
  73. "gui_edit 'SILO Config File' /etc/silo.conf"
  74. do : ; done
  75. }