aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2006-01-28 15:59:48 +0800
committerdinoex <dinoex@FreeBSD.org>2006-01-28 15:59:48 +0800
commitbf8925d5a3d3daa5a986617ca7a48888daf68889 (patch)
tree61280241e0117ef4055d7cccf138be9148533cb9 /net
parentf62880fcc59c5b972bde8156376c1df4aeac746b (diff)
downloadfreebsd-ports-gnome-bf8925d5a3d3daa5a986617ca7a48888daf68889.tar.gz
freebsd-ports-gnome-bf8925d5a3d3daa5a986617ca7a48888daf68889.tar.zst
freebsd-ports-gnome-bf8925d5a3d3daa5a986617ca7a48888daf68889.zip
- fix PREFIX in rc.file
Diffstat (limited to 'net')
-rw-r--r--net/samba/Makefile1
-rw-r--r--net/samba/files/samba.sh.sample31
2 files changed, 16 insertions, 16 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile
index 9ffe0130c0ef..23ba5eae791a 100644
--- a/net/samba/Makefile
+++ b/net/samba/Makefile
@@ -252,6 +252,7 @@ post-install:
-e 's!%%SAMBA_LOGDIR%%!${SAMBA_LOGDIR}!' \
-e 's!%%SAMBA_CONFDIR%%!${SAMBA_CONFDIR}!' \
-e 's!%%SAMBA_VFSDIR%%!${SAMBA_VFSDIR}!' \
+ -e 's!%%PREFIXX%%!${PREFIX}!' \
${FILESDIR}/smb.conf.default \
> ${SAMPLE_CONFIG} ; \
fi
diff --git a/net/samba/files/samba.sh.sample b/net/samba/files/samba.sh.sample
index 3fca292861b2..04bf048e2164 100644
--- a/net/samba/files/samba.sh.sample
+++ b/net/samba/files/samba.sh.sample
@@ -1,20 +1,15 @@
#!/bin/sh
-
-rc_file=${0##*/}
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
- echo "${rc_file}: Cannot determine PREFIX." >&2
- echo "Please use the complete pathname." >&2
- exit 64
-fi
+#
+# $FreeBSD$
+#
smbspool=/var/spool/samba
pidfiledir=/var/run
-smbd=${PREFIX}/sbin/smbd
-nmbd=${PREFIX}/sbin/nmbd
+smbd=%%PREFIX%%/sbin/smbd
+nmbd=%%PREFIX%%/sbin/nmbd
-# start
-if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
+case "$1" in
+start)
if [ -f $smbd ]; then
if [ -d $smbspool ]; then
rm -f $smbspool/*
@@ -23,9 +18,13 @@ if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
$smbd -D
$nmbd -D
fi
-
-# stop
-elif [ "x$1" = "xstop" ]; then
+ ;;
+stop)
kill `cat $pidfiledir/smbd.pid`
kill `cat $pidfiledir/nmbd.pid`
-fi
+ ;;
+*)
+ echo "Usage: ${0##*/}: { start | stop }" >&2
+ exit 64
+ ;;
+esac