diff options
author | tron <tron> | 2001-02-04 15:29:58 +0000 |
---|---|---|
committer | tron <tron> | 2001-02-04 15:29:58 +0000 |
commit | 5f2968a3f3465be60bde23d8090fd94c59df20dd (patch) | |
tree | 5cd3ddcfd44c573de794b8a9fe03396ff1183360 /net/samba | |
parent | f6f87454b30995f1ac7139829231ad3f2b20e1ad (diff) | |
download | pkgsrc-5f2968a3f3465be60bde23d8090fd94c59df20dd.tar.gz |
Replace monolithic old style startup script with two new style startup
scripts which include backward compatibility for pre 1.5 systems.
Diffstat (limited to 'net/samba')
-rw-r--r-- | net/samba/Makefile | 16 | ||||
-rwxr-xr-x | net/samba/files/nmbd.sh | 24 | ||||
-rw-r--r-- | net/samba/files/samba.sh | 12 | ||||
-rwxr-xr-x | net/samba/files/smbd.sh | 24 | ||||
-rw-r--r-- | net/samba/pkg/PLIST | 5 |
5 files changed, 61 insertions, 20 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile index 9dcbe24150d..bde0c7e3e6e 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2000/11/20 02:45:18 kim Exp $ +# $NetBSD: Makefile,v 1.40 2001/02/04 15:29:58 tron Exp $ DISTNAME= samba-2.0.7-ja-1.3 PKGNAME= samba-2.0.7.1.3 @@ -23,7 +23,6 @@ GNU_CONFIGURE= # defined .include "../../mk/bsd.prefs.mk" -STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/samba.sh.sample SAMPLE_CONFIG= ${PREFIX}/share/examples/samba/smb.conf.sample SAMBA_LOGDIR= /var/log SAMBA_LOCKDIR= /var/run/samba @@ -53,6 +52,13 @@ DEINSTALL_FILE= ${WRKDIR}/DEINSTALL pre-configure: cd ${WRKSRC}; ${LOCALBASE}/bin/autoreconf +post-build: +.for FILE in nmbd.sh smbd.sh + ${SED} -e "s,@PREFIX@,${PREFIX},g" \ + -e "s,@ECHO@,${ECHO},g" \ + < ${FILESDIR}/${FILE} > ${WRKDIR}/${FILE} +.endfor + post-install: # Install Samba documentation. # @@ -81,10 +87,8 @@ post-install: ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/samba ${CHMOD} -R ugo-w ${PREFIX}/share/examples/samba - ${SED} -e "s,@PREFIX@,${PREFIX},g" \ - -e "s,@ECHO@,${ECHO},g" \ - < ${FILESDIR}/samba.sh > ${WRKDIR}/samba.sh - ${INSTALL_SCRIPT} ${WRKDIR}/samba.sh ${STARTUP_SCRIPT} + ${INSTALL_SCRIPT} ${WRKDIR}/nmbd.sh ${WRKDIR}/smbd.sh \ + ${PREFIX}/etc/rc.d ${SED} -e 's,@LOGDIR@,${SAMBA_LOGDIR},g' \ -e 's,@ETCDIR@,${SAMBA_ETCDIR},g' \ diff --git a/net/samba/files/nmbd.sh b/net/samba/files/nmbd.sh new file mode 100755 index 00000000000..79930fb04e3 --- /dev/null +++ b/net/samba/files/nmbd.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# $NetBSD: nmbd.sh,v 1.1 2001/02/04 15:29:58 tron Exp $ +# +# PROVIDE: nmbd +# REQUIRE: DAEMON + +name="nmbd" +command="@PREFIX@/sbin/${name}" +command_args="-D" + +if [ ! -d /etc/rc.d ] +then + @ECHO@ -n ' ${name}' + exec ${command} ${command_args} +fi + +. /etc/rc.subr + +pidfile="/var/run/samba/${name}.pid" +required_files="/etc/samba/smb.conf" + +load_rc_config $name +run_rc_command "$1" diff --git a/net/samba/files/samba.sh b/net/samba/files/samba.sh deleted file mode 100644 index a5d34674320..00000000000 --- a/net/samba/files/samba.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# $NetBSD: samba.sh,v 1.2 2000/05/02 15:24:09 jlam Exp $ - -smbd=@PREFIX@/sbin/smbd -nmbd=@PREFIX@/sbin/nmbd - -if [ -f ${smbd} ]; then - @ECHO@ -n ' samba' - ${smbd} -D - ${nmbd} -D -fi diff --git a/net/samba/files/smbd.sh b/net/samba/files/smbd.sh new file mode 100755 index 00000000000..d04b8a54068 --- /dev/null +++ b/net/samba/files/smbd.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# $NetBSD: smbd.sh,v 1.1 2001/02/04 15:29:59 tron Exp $ +# +# PROVIDE: smbd +# REQUIRE: nmbd + +name="smbd" +command="@PREFIX@/sbin/${name}" +command_args="-D" + +if [ ! -d /etc/rc.d ] +then + @ECHO@ -n ' ${name}' + exec ${command} ${command_args} +fi + +. /etc/rc.subr + +pidfile="/var/run/samba/${name}.pid" +required_files="/etc/samba/smb.conf" + +load_rc_config $name +run_rc_command "$1" diff --git a/net/samba/pkg/PLIST b/net/samba/pkg/PLIST index b7be843a06c..8ca93fe2f56 100644 --- a/net/samba/pkg/PLIST +++ b/net/samba/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.19 2000/10/07 13:58:31 kei Exp $ +@comment $NetBSD: PLIST,v 1.20 2001/02/04 15:29:59 tron Exp $ bin/addtosmbpass bin/convert_smbpasswd bin/make_printerdef @@ -14,7 +14,8 @@ bin/smbstatus bin/smbtar bin/testparm bin/testprns -etc/rc.d/samba.sh.sample +etc/rc.d/nmbd.sh +etc/rc.d/smbd.sh lib/codepages/codepage.1251 lib/codepages/codepage.437 lib/codepages/codepage.737 |