PREUN
/bin/sh
if [ $1 = 0 ] ; then
/sbin/chkconfig --del smb
if [ -e /var/lock/samba/browse.dat ]; then
rm -f /var/lock/samba/browse.dat
fi
if [ -e /var/lock/samba/wins.dat ]; then
rm -f /var/lock/samba/wins.dat
fi
if [ -d /var/log/samba ]; then
rm -rf /var/log/samba/*
fi
if [ -d /var/lock/samba ]; then
rm -rf /var/lock/samba/*
fi
fi
POSTIN
/bin/sh
/sbin/chkconfig --add smb
killall -HUP inetd &>/dev/null || true
POSTUN
/bin/sh
if [ $1 = 0 ] ; then
# Remove swat entries from /etc/inetd.conf and /etc/services
# tmpfile="`/bin/mktemp /etc/tmp.XXXXXX`"
# sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
# cp $tmpfile /etc/inetd.conf
# sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
# cp $tmpfile /etc/services
# rm -f $tmpfile
perl -ni -e 'print unless (/^swat\W+/ || /^#swat\W+/)' /etc/inetd.conf
perl -ni -e 'print unless /^swat\W+/' /etc/services
killall -HUP inetd &>/dev/null || true
fi
Triggers
samba <
1.9.18p7
/bin/sh
if [ $1 != 0 ]; then
/sbin/chkconfig --add smb
fi
samba <
2.0.5a-3
/bin/sh
if [ $1 != 0 ]; then
for dir in /var/lock/samba /var/spool/samba ; do
[ ! -d $dir ] && mkdir -m 0755 $dir
done
chmod 644 /etc/services /etc/inetd.conf
fi
samba >=
2.0.0
/bin/sh
if [ $1 != 0 ]; then
/sbin/chkconfig --add smb
fi
samba <
1.9.18p7
/bin/sh
if [ $1 != 0 ]; then
for dir in /var/lock/samba /var/spool/samba ; do
[ ! -d $dir ] && mkdir -m 0755 $dir
done
chmod 644 /etc/services /etc/inetd.conf
fi
samba <
2.0.5a-3
/bin/sh
if [ $1 != 0 ]; then
/sbin/chkconfig --add smb
fi
samba >=
2.0.0
/bin/sh
if [ $1 != 0 ]; then
for dir in /var/lock/samba /var/spool/samba ; do
[ ! -d $dir ] && mkdir -m 0755 $dir
done
chmod 644 /etc/services /etc/inetd.conf
fi