Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > media > main > by-pkgid > d6ef4e01d7ce151b521222905330cb2f > scriptlet

diald-1.0-5mdk.i586.rpm

PREIN

/bin/sh
if [ $1 = "1" ]; then # first installation
# for diald config
grep -q '^alias tap0' /etc/modules.conf  || {
		echo "alias tap0 ethertap" >> /etc/modules.conf
		echo "options tap0 -o tap0 unit=0" >> /etc/modules.conf
}
fi

PREUN

/bin/sh
/usr/share/rpm-helper/del-service diald $1 diald

POSTIN

/bin/sh
/usr/share/rpm-helper/add-service diald $1 diald

POSTUN

/bin/sh
if [ $1 = "0" ]; then # full removal
# diald unload modules
perl -ni -e 'print unless ( m!^.*tap0.*$! || /^\s*$/)' /etc/modules.conf
fi