PREUN
/bin/sh
/usr/share/rpm-helper/del-service initscripts $1 netfs
/usr/share/rpm-helper/del-service initscripts $1 netconsole
/usr/share/rpm-helper/del-service initscripts $1 dm
/usr/share/rpm-helper/del-service initscripts $1 network-up
/usr/share/rpm-helper/del-service initscripts $1 network
/usr/share/rpm-helper/del-service initscripts $1 partmon
POSTIN
/bin/sh
##Fixme
touch /etc/sysconfig/i18n
##
touch /var/log/wtmp /var/run/utmp /var/log/btmp
chown root:utmp /var/log/wtmp /var/run/utmp /var/log/btmp
chmod 664 /var/log/wtmp /var/run/utmp
chmod 600 /var/log/btmp
if [ $1 = 1 ]; then /sbin/chkconfig --add partmon; fi;
if [ $1 = 1 ]; then /sbin/chkconfig --add network; fi;
if [ $1 = 1 ]; then /sbin/chkconfig --add network-up; fi;
if [ $1 = 1 ]; then /sbin/chkconfig --add dm; fi;
if [ $1 = 1 ]; then /sbin/chkconfig --add netconsole; fi;
if [ $1 = 1 ]; then /sbin/chkconfig --add netfs; fi;
# /etc/sysconfig/desktop format has changed
if [ -r /etc/sysconfig/desktop ]; then
if ! grep -q = /etc/sysconfig/desktop; then
DESK=`cat /etc/sysconfig/desktop`
echo "DESKTOP=$DESK" > /etc/sysconfig/desktop
fi
fi
# Add right translation file
for i in `echo $LANGUAGE:$LC_ALL:$LC_COLLATE:$LANG:C | tr ':' ' '`
do
if [ -r /usr/share/locale/$i/LC_MESSAGES/initscripts.mo ]; then
mkdir -p /etc/locale/$i/LC_MESSAGES/
cp /usr/share/locale/$i/LC_MESSAGES/initscripts.mo \
/etc/locale/$i/LC_MESSAGES/
#
# warly
# FIXME: this should be done by each locale when installed or upgraded
#
pushd /usr/share/locale/$i/ > /dev/null && for j in LC_*
do
if [ -r $j -a ! -d $j ]; then
cp $j /etc/locale/$i/
fi
done && popd > /dev/null
if [ -r /usr/share/locale/$i/LC_MESSAGES/SYS_LC_MESSAGES ]; then
cp /usr/share/locale/$LANG/LC_MESSAGES/SYS_LC_MESSAGES /etc/locale/$i/LC_MESSAGES/
fi
#
#
break
fi
done
# only needed on upgrade
if [ $1 != 0 ]; then
# handle the switch to an independant prefdm initscript
if grep -q '^x:5' /etc/inittab; then
rm -f /etc/inittab.new
sed 's/x:5/#x:5/' < /etc/inittab > /etc/inittab.new
mv -f /etc/inittab.new /etc/inittab
chkconfig --add dm || :
fi
# handle single user mode declaration
if ! grep -q '..:S:' /etc/inittab; then
cat >> /etc/inittab <<EOF
# Single user mode
~~:S:wait:/bin/sh
EOF
fi
# Handle boot sequence changes on upgrade
if [[ -f /etc/rc3.d/S80partmon ]] && [[ -f /etc/rc5.d/S80partmon ]] && egrep -q 'chkconfig: [0-9]+ 13' /etc/init.d/partmon; then chkconfig --add partmon || : ; fi;
fi
POSTUN
/bin/sh
if [ -f /var/lock/TMP_1ST ];then
rm -f /var/lock/TMP_1ST
fi
if [ "$1" = "0" ]; then
for i in /etc/locale/*/LC_MESSAGES/initscripts.mo
do
rm -f $i
rmdir `dirname $i` >/dev/null 2> /dev/null
done
rmdir /etc/locale/* >/dev/null 2> /dev/null
fi
Triggers
initscripts <=
4.72
/bin/sh
. /etc/sysconfig/init
. /etc/sysconfig/network
# These are the non-default settings. By putting them at the end
# of the /etc/sysctl.conf file, it will override the default
# settings earlier in the file.
if [ -n "$FORWARD_IPV4" -a "$FORWARD_IPV4" != "no" -a "$FORWARD_IPV4" != "false" ]; then
echo "# added by initscripts install on `date`" >> /etc/sysctl.conf
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
fi
newnet=`mktemp /etc/sysconfig/network.XXXXXX`
if [ -n "$newnet" ]; then
sed "s|FORWARD_IPV4.*|# FORWARD_IPV4 removed; see /etc/sysctl.conf|g" \
/etc/sysconfig/network > $newnet
sed "s|DEFRAG_IPV4.*|# DEFRAG_IPV4 removed; obsolete in 2.4. kernel|g" \
$newnet > /etc/sysconfig/network
rm -f $newnet
fi
if [ -n "$MAGIC_SYSRQ" -a "$MAGIC_SYSRQ" != "no" ]; then
echo "# added by initscripts install on `date`" >> /etc/sysctl.conf
echo "kernel.sysrq = 1" >> /etc/sysctl.conf
fi
if uname -m | grep -q sparc ; then
if [ -n "$STOP_A" -a "$STOP_A" != "no" ]; then
echo "# added by initscripts install on `date`" >> /etc/sysctl.conf
echo "kernel.stop-a = 1" >> /etc/sysctl.conf
fi
fi
initscripts <
7.62
/bin/sh
/sbin/chkconfig --del random
/sbin/chkconfig --del rawdevices
exit 0
initscripts <=
8.38-2mdv2007.0
/bin/sh
/sbin/chkconfig --add network-up
exit 0
initscripts <
8.54-4mdv2008.0
/bin/sh
echo "disabling supermount which is not supported anymore"
/usr/sbin/supermount -i disable
exit 0