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.

60 lines
1.7 KiB

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