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.

74 lines
2.3 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../elftoaout/elftoaout.setup
  6. # Copyright (C) 2006 The T2 SDE Project
  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. # --- SDE-COPYRIGHT-NOTE-END ---
  15. #
  16. # ROCK Linux: /etc/setup.d/10-silo
  17. # derived from lilo package
  18. # in rock-linux 1.5.12-2001-03*
  19. #
  20. # Read /etc/setup.d/00-general for details about ROCK Linux setup scripts.
  21. #
  22. case "$1" in
  23. setup)
  24. ;;
  25. [a-z]*)
  26. exit 0 ;;
  27. *)
  28. echo "Usage: $0 setup" ; exit 1 ;;
  29. esac
  30. echo -n 'Would you like to run the silo setup script now? (YES/no) '
  31. read in ; [[ "$in" == [nN]* ]] && exit 0 ; unset in
  32. echo -e '\n==> SILO configuration <=='
  33. echo -n 'Would you like me to create a /etc/silo.conf file? (YES/no) '
  34. read in
  35. case "$in" in
  36. [nN]*) echo ; exit ;;
  37. *)
  38. rootdev="`grep '^/dev/.* / ' /etc/fstab | tr ' ' '\t' | cut -f1`"
  39. # in silo.conf: if default is omitted, the first profile is used.
  40. echo
  41. { echo -e '# silo.conf - autogenerated by rocklinux'
  42. echo -e 'boot=/dev/discs/disc0/disc\ndelay=100\ndefault=rock\n'
  43. echo -e '# failsafe method, for the time until both kernels work\n'
  44. echo -e 'image=/boot/vmlinux32.gz\n\tlabel=rock'
  45. echo -e '\troot="'$rootdev'"\n\tread-only'
  46. echo -e '# autoselection sparc v.8 kernel (Sparc, MicroSparc,SuperSparc, HyperSparc)\n'
  47. echo -e 'image[sun4c,sun4d,sun4m]=/boot/vmlinux32.gz\n\tlabel=rock32'
  48. echo -e '\troot="'$rootdev'"\n\tread-only'
  49. echo -e '# autoselection sparc v.9 kernel (Ultra Sparc)\n'
  50. echo -e 'image[sun4u]=/boot/vmlinux64.gz\n\tlabel=rock64'
  51. echo -e '\troot="'$rootdev'"\n\tread-only'
  52. } | tee /etc/silo.conf | sed 's,^,> ,'
  53. echo
  54. esac
  55. echo -n 'Would you like me to install SILO now in the Bootblock ? (YES/no) '
  56. read in ; echo
  57. case "$in" in
  58. [nN]*) ;;
  59. *) silo ; echo ;;
  60. esac
  61. echo -e 'Don`t forget to check your devalias and boot-device settings at the OBP.\n'
  62. echo -e 'If you experience problems with silo devfs compatibility, add devices with mknod.'