Browse Source

fake:


			
			
				rocklinux
			
			
		
fake 20 years ago
parent
commit
107f319f47
3 changed files with 87 additions and 59 deletions
  1. +1
    -3
      package/sparc/silo/silo.conf
  2. +0
    -56
      package/sparc/silo/silo.setup
  3. +86
    -0
      package/sparc/silo/stone_mod_silo.sh

+ 1
- 3
package/sparc/silo/silo.conf

@ -27,9 +27,7 @@ pm_silo() {
cp -v etc/silo.conf $docdir
mkdir -p $root/etc/setup.d
cp $confdir/silo.setup $root/etc/setup.d/10-silo
chmod +x $root/etc/setup.d/10-silo
cp -v $confdir/stone_mod_silo.sh $root/etc/stone.d/mod_silo.sh
}
hook_add postmake 3 pm_silo

+ 0
- 56
package/sparc/silo/silo.setup

@ -1,56 +0,0 @@
#!/bin/sh
#
# ROCK Linux: /etc/setup.d/10-silo
# derived from lilo package
# in rock-linux 1.5.12-2001-03*
#
# Read /etc/setup.d/00-general for details about ROCK Linux setup scripts.
#
case "$1" in
setup)
;;
[a-z]*)
exit 0 ;;
*)
echo "Usage: $0 setup" ; exit 1 ;;
esac
echo -n 'Would you like to run the silo setup script now? (YES/no) '
read in ; [[ "$in" == [nN]* ]] && exit 0 ; unset in
echo -e '\n==> SILO configuration <=='
echo -n 'Would you like me to create a /etc/silo.conf file? (YES/no) '
read in
case "$in" in
[nN]*) echo ; exit ;;
*)
rootdev="`grep '^/dev/.* / ' /etc/fstab | tr ' ' '\t' | cut -f1`"
# in silo.conf: if default is omitted, the first profile is used.
echo
{ echo -e '# silo.conf - autogenerated by rocklinux'
echo -e 'boot=/dev/discs/disc0/disc\ndelay=100\ndefault=rock\n'
echo -e '# autoselection sparc v.8 kernel (Sparc, MicroSparc,SuperSparc, HyperSparc)\n'
echo -e 'image[sun4c,sun4d,sun4m]=/boot/vmlinux32.gz\n\tlabel=rock32'
echo -e '\troot="'$rootdev'"\n\tread-only'
echo -e '# autoselection sparc v.9 kernel (Ultra Sparc)\n'
echo -e 'image[sun4u]=/boot/vmlinux64.gz\n\tlabel=rock64'
echo -e '\troot="'$rootdev'"\n\tread-only'
} | tee /etc/silo.conf | sed 's,^,> ,'
echo
esac
echo -n 'Would you like me to install SILO now in the Bootblock ? (YES/no) '
read in ; echo
case "$in" in
[nN]*) ;;
*) silo ; echo ;;
esac
echo -e 'Don`t forget to check your devalias and boot-device settings at the OBP.\n'
echo -e 'If you experience problems with silo devfs compatibility, add devices with mknod.'

+ 86
- 0
package/sparc/silo/stone_mod_silo.sh

@ -0,0 +1,86 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/sparc/silo/stone_mod_silo.sh
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
#
# [MAIN] 70 silo SILO Boot Loader Setup
create_silo_conf() {
rootdev="`grep '^/dev/.* / ' /etc/fstab | tr ' ' '\t' | cut -f1`"
cat << EOT > /etc/silo.conf
timeout=40
default=rock
image[sun4c,sun4d,sun4m]=/boot/vmlinux32.gz
label=rock
root=$rootdev
read-only
image[sun4u]=/boot/vmlinux64.gz
label=rock
root=$rootdev
read-only
EOT
gui_message "This is the new /etc/silo.conf file:
$( cat /etc/silo.conf )"
}
install_silo() {
if [ -n "`ls -l /dev/discs/disc0 | grep scsi`" ] ; then
# Ultra 30 and many more...
DEV="sda";
else
# IDE - by default this is slave, but let's check...
if [ -n "`ls -l /dev/discs/disc0 | grep bus0`" ] ; then
DEV="hda";
else
DEV="hdc";
fi
fi
echo "Creating symlinks for /dev/$DEV - silo doesn't do devfs yet."
ln -s /dev/discs/disc0/disc /dev/$DEV
for i in /dev/discs/disc0/part* ; do
PARTNO=`echo $i | sed -e 's,/dev/discs/disc0/part,,'`
echo "Creating symlink $i -> /dev/$DEV$PARTNO"
ln -s $i /dev/$DEV$PARTNO
done
if silo ; then
echo "SILO installed succesfully" ;
else
echo "SILO install failed!" ;
fi
}
main() {
while
gui_menu silo 'SILO Boot Loader Setup' \
'(Re-)Create default /etc/silo.conf' 'create_silo_conf' \
'(Re-)Install SILO in the Bootblock of /dev/discs/disc0/disc' \
'gui_cmd "Installing SILO in Bootblock..." "install_silo"' \
"Edit /etc/silo.conf" \
"gui_edit 'SILO Config File' /etc/silo.conf"
do : ; done
}

Loading…
Cancel
Save