summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2006-01-28 07:59:48 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2006-01-28 07:59:48 +0000
commit3178625f7ee4833af71768c790693d5d2b27ed82 (patch)
tree3cd4ccd037a92d84fac49618f744bc9cee3ea268
parentIncorporate 1.63 from the master. (diff)
- fix PREFIX in rc.file
Notes
Notes: svn path=/head/; revision=154633
-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