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