summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-10-09 06:29:50 +0000
committerTim Potter <tpot@samba.org>2003-10-09 06:29:50 +0000
commit27e8f16188b5db96ae191b2e6ad9948e46d6d9b1 (patch)
tree47944a213b102ce42247ae685764c52e23e78f0c
parent2aaafa500780f7de0dec5632d53f3347b67fae4a (diff)
downloadsamba-27e8f16188b5db96ae191b2e6ad9948e46d6d9b1.tar.gz
Merge from 3.0:
>cosmetic fix when DESTDIR=/ (default) >fixed for /sbin/mount.smbfs link when using $DESTDIR; bug 525
-rwxr-xr-xsource/script/installbin.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/script/installbin.sh b/source/script/installbin.sh
index c2f34082dd9..f9fd5298c09 100755
--- a/source/script/installbin.sh
+++ b/source/script/installbin.sh
@@ -1,10 +1,12 @@
#!/bin/sh
INSTALLPERMS=$1
-BASEDIR=$2
-BINDIR=$3
-LIBDIR=$4
-VARDIR=$5
+DESTDIR=$2
+BASEDIR=`echo $3 | sed 's/\/\//\//g'`
+BINDIR=`echo $4 | sed 's/\/\//\//g'`
+LIBDIR=`echo $5 | sed 's/\/\//\//g'`
+VARDIR=`echo $6 | sed 's/\/\//\//g'`
+shift
shift
shift
shift
@@ -23,7 +25,10 @@ for p in $*; do
# this is a special case, mount needs this in a specific location
if [ $p2 = smbmount ]; then
- ln -sf $BINDIR/$p2 /sbin/mount.smbfs
+ if [ ! -d $DESTDIR/sbin ]; then
+ mkdir $DESTDIR/sbin
+ fi
+ ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs
fi
done