Sophie

Sophie

distrib > Mandriva > 9.0 > x86_64 > media > main > by-pkgid > c736723254f0d79cf492e185ffe83ab1 > scriptlet

diald-1.0-2mdk.x86_64.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