Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main > by-pkgid > 030f5c1b19ab76cf8caf08edf1669220 > scriptlet

samba-2.0.7-18mdk.i586.rpm

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
if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi

service xinetd reload &>/dev/null || :

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
    service xinetd reload &>/dev/null || :
fi
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || 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
    [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba
	[ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba
	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
    [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba
	[ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba
	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
    [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba
	[ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba
	chmod 644 /etc/services /etc/inetd.conf
fi