summaryrefslogtreecommitdiff
path: root/source3/script/uninstallbin.sh
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2006-02-24 00:30:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:21 -0500
commit9169edfeb4ea4358dbaf948372847542fb57464e (patch)
tree8d7e90e42d7bb6ec37a12f8c9885038720bf4025 /source3/script/uninstallbin.sh
parente18349b2bb6f4df9c6d08a3d62cfbf012f7f3660 (diff)
downloadsamba-9169edfeb4ea4358dbaf948372847542fb57464e.tar.gz
samba-9169edfeb4ea4358dbaf948372847542fb57464e.tar.bz2
samba-9169edfeb4ea4358dbaf948372847542fb57464e.zip
r13663: make uninstall DESTDIR=/somewhere no longer leaves files. This is done
with the new rules: uninstallservers uninstalldat, uninstallswat (calles uninstallmsg), uninstallmodules, uninstallclientlib, and uninstalllibmsrpc. We still leave directories. We might try to remove the dirs we created in reverse order. The new uninstall scripts are sym links to the respective install scripts. Inside we set mode to install or uninstall. installservers is now used to install the servers. These are no longer installed with installbin. (This used to be commit 43549301b937c060742840054017b31bf3781e04)
Diffstat (limited to 'source3/script/uninstallbin.sh')
-rwxr-xr-xsource3/script/uninstallbin.sh28
1 files changed, 15 insertions, 13 deletions
diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh
index 5de936fccf..597c5d95a5 100755
--- a/source3/script/uninstallbin.sh
+++ b/source3/script/uninstallbin.sh
@@ -2,31 +2,33 @@
#4 July 96 Dan.Shearer@UniSA.edu.au
INSTALLPERMS=$1
-BASEDIR=`echo $2 | sed 's/\/\//\//g'`
+DESTDIR=$2
BINDIR=`echo $3 | sed 's/\/\//\//g'`
-LIBDIR=`echo $4 | sed 's/\/\//\//g'`
-VARDIR=`echo $5 | sed 's/\/\//\//g'`
-shift
-shift
shift
shift
shift
-if [ ! -d $BINDIR ]; then
- echo Directory $BINDIR does not exist!
- echo Do a "make installbin" or "make install" first.
+if [ ! -d $DESTDIR/$BINDIR ]; then
+ echo "Directory $DESTDIR/$BINDIR does not exist! "
+ echo "Do a "make installbin" or "make install" first. "
exit 1
fi
for p in $*; do
p2=`basename $p`
- if [ -f $BINDIR/$p2 ]; then
- echo Removing $BINDIR/$p2
- rm -f $BINDIR/$p2
- if [ -f $BINDIR/$p2 ]; then
- echo Cannot remove $BINDIR/$p2 ... does $USER have privileges?
+ if [ -f $DESTDIR/$BINDIR/$p2 ]; then
+ echo "Removing $DESTDIR/$BINDIR/$p2 "
+ rm -f $DESTDIR/$BINDIR/$p2
+ if [ -f $DESTDIR/$BINDIR/$p2 ]; then
+ echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? "
fi
fi
+
+ # this is a special case, mount needs this in a specific location
+ if test "$p2" = smbmount -a -e "$DESTDIR/sbin/mount.smbfs"; then
+ echo "Removing $DESTDIR/sbin/mount.smbfs "
+ rm -f "$DESTDIR/sbin/mount.smbfs"
+ fi
done