Installation script of "i4l"
#!/bin/sh
#
# install/doinst.sh - to be done after extraction
#
# Copyright (c) 1997 S.u.S.E. GmbH Fuerth, Germany.
#
#
echo "check SuSE Version and updating etc/rc.config..."
# wenn es noch keine 6.x ist
#
# dank an werner für diesen code ;)))
#
if [ -f etc/SuSE-release ] ; then
while read line ; do
case "$line" in
VERSION*) break ;;
*) ;;
esac
done < etc/SuSE-release
else
# use 5.3 for anything older
line="VERSION = 5.3"
fi
line=${line##*=}
# if ! test ${line%.*} -ge 6 -a ${line#*.} -ge 0 ; then
if ! test ${line%.*} -ge 6 ; then
if [ -x bin/fillup ] ; then
if ! [ -d etc/rc.config.d ] ; then
mkdir -p etc/rc.config.d
fi
echo -n "setting up i4l."
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_ID/I4L_ID/g" > etc/rc.config
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_TYPE/I4L_TYPE/g" > etc/rc.config
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_IRQ/I4L_IRQ/g" > etc/rc.config
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_MEMBASE/I4L_MEMBASE/g" > etc/rc.config
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_PORT/I4L_PORT/g" > etc/rc.config
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_IO0/I4L_IO0/g" > etc/rc.config
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_IO1/I4L_IO1/g" > etc/rc.config
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | sed -e "s/I4L_TELES_MODUL_OPTIONS/I4L_MODUL_OPTIONS/g" > etc/rc.config
echo -n "."
fillup -t -r -i etc/rc.config var/adm/fillup-templates/i4l_b1.templ etc/rc.config.d/i4l_b1.rc.config
echo -n "."
mv etc/rc.config.new etc/rc.config
echo -n "."
fillup -t -r -i etc/rc.config var/adm/fillup-templates/i4l_default.templ etc/rc.config.d/i4l_default.rc.config
echo -n "."
mv etc/rc.config.new etc/rc.config
echo -n "."
fillup -t -r -i etc/rc.config var/adm/fillup-templates/i4l_hisax.templ etc/rc.config.d/i4l_hisax.rc.config
echo -n "."
mv etc/rc.config.new etc/rc.config
echo -n "."
fillup -t -r -i etc/rc.config var/adm/fillup-templates/i4l_icn.templ etc/rc.config.d/i4l_icn.rc.config
echo -n "."
mv etc/rc.config.new etc/rc.config
echo -n "."
fillup -t -r -i etc/rc.config var/adm/fillup-templates/i4l_option.templ etc/rc.config.d/i4l_option.rc.config
echo -n "."
mv etc/rc.config.new etc/rc.config
echo -n "."
fillup -t -r -i etc/rc.config var/adm/fillup-templates/i4l_sp_option.templ etc/rc.config.d/i4l_sp_option.rc.config
echo -n "."
mv etc/rc.config.new etc/rc.config
echo -n "."
# all unknown I4L variable from /etc/rc.config
# move to /etc/rc.config.d/i4l_unknown
touch etc/rc.config.d/i4l_unknown
echo -n "."
mv etc/rc.config etc/rc.config.old
cat etc/rc.config.old | grep "^I4" >> etc/rc.config.d/i4l_unknown
echo -n "."
cat etc/rc.config.old | grep -v "^I4" > etc/rc.config.new
echo -n "."
mv etc/rc.config.new etc/rc.config
echo "done"
else
echo "ERROR: fillup not found. This should not happen. Please compare"
echo "etc/rc.config.d/* and var/adm/fillup-templates/i4l*"
echo "and update by hand."
fi
else
# wenn es schon eine 6.x ist und
# die i4l_* files nicht schon unter /etc/rc.config.d/ liegen
# (das paket also neu installiert wird)
# nur die templates kopieren
if ! [ -f etc/rc.config.d/i4l_default.rc.config ] ; then
cp var/adm/fillup-templates/i4l_b1.templ etc/rc.config.d/i4l_b1.rc.config
cp var/adm/fillup-templates/i4l_default.templ etc/rc.config.d/i4l_default.rc.config
cp var/adm/fillup-templates/i4l_hisax.templ etc/rc.config.d/i4l_hisax.rc.config
cp var/adm/fillup-templates/i4l_icn.templ etc/rc.config.d/i4l_icn.rc.config
cp var/adm/fillup-templates/i4l_option.templ etc/rc.config.d/i4l_option.rc.config
cp var/adm/fillup-templates/i4l_sp_option.templ etc/rc.config.d/i4l_sp_option.rc.config
touch etc/rc.config.d/i4l_unknown
fi
fi
### send mail to root
#mkdir -p var/adm/notify/messages
#cat << EOT > var/adm/notify/messages/i4l-notify
#Changes regarding configuration of ISDN (I4L)
#-----------------------------------------------------------
#All parameters previously located in /etc/rc.config have
#been moved to several files in /etc/rc.config.d,
#They are named i4l_XXXXX.rc.config
#
#I4L parameters which where not normally include in
#/etc/rc.config are now in /etc/rc.config.d/i4l_unknown,
#including all parameters regarding the configuration
#of more than 4 ISDN-Interfaces (I4L_XXXX_4).
#
#Please move these manually to the appropriate
#i4l_XXXXX.rc.config files, so that YaST is able to
#find them. You only need to do this, if you currently
#have more than 4 ISDN interfaces configured.
#
#Have fun!
#
#
#Änderungen bei der Konfiguration von ISDN (I4L)
#-----------------------------------------------------------
#
#Alle Variablen aus /etc/rc.config sind der Übersicht halber
#in einzelne Dateien unter /etc/rc.config.d/i4l* verschoben
#worden.
#
#I4L Variablen, die nicht standardmäßig in der /etc/rc.config
#waren, finden Sie in /etc/rc.config.d/i4l_unknown.
#Dazu gehören auch alle Variablen die Sie bei mehr als
#4 ISDN-Interfaces brauchen (I4L_*_4).
#Verschieben Sie diese bitte per Hand in die entsprechenden
#Dateien unter /etc/rc.config.d/i4l_*.rc.config, damit YaST
#diese auch bearbeiten kann.
#
#
#-----------------------------------------------------------
#
#EOT
(c) S.u.S.E. - Last update: 23.03.99 02:49;