summaryrefslogtreecommitdiff
path: root/packaging/Caldera/UnixWare/pkg/postremove
blob: dc81d6fa85f1d05f31a81222d94e51eb51e263e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# Remove /var/spool/samba and delete inetd entries for swat
#

SPOOL=/var/spool/samba
SVCS=/etc/services
INET=/etc/inetd.conf

[ -d $SPOOL ] && {
     rm -rf $SPOOL
}

grep swat $SVCS > /dev/null && {
     B=`basename $SVCS`
     T=$B$$
     grep -v swat $SVCS > /tmp/$T
     cp /tmp/$T $SVCS
     rm -f /tmp/$T
}

grep swat $INET > /dev/null || {
     B=`basename $INET`
     T=$B$$
     grep -v swat $INET > /tmp/$T
     cp /tmp/$T $INET
     rm -f /tmp/$T
}

kill -1 `ps -e | grep inetd | awk ' { print $1 } '`