diff options
-rw-r--r-- | net/samba/Makefile | 10 | ||||
-rwxr-xr-x | net/samba/files/nmbd.sh | 25 | ||||
-rw-r--r-- | net/samba/files/samba.sh | 51 | ||||
-rwxr-xr-x | net/samba/files/smbd.sh | 26 | ||||
-rw-r--r-- | net/samba/pkg/PLIST | 5 | ||||
-rw-r--r-- | net/samba20/Makefile | 10 | ||||
-rwxr-xr-x | net/samba20/files/nmbd.sh | 25 | ||||
-rw-r--r-- | net/samba20/files/samba.sh | 51 | ||||
-rwxr-xr-x | net/samba20/files/smbd.sh | 26 | ||||
-rw-r--r-- | net/samba20/pkg/PLIST | 5 |
10 files changed, 112 insertions, 122 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile index 2e67187f90d..37149321a20 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.62 2001/07/14 12:37:54 jlam Exp $ +# $NetBSD: Makefile,v 1.63 2001/08/22 15:42:17 jlam Exp $ DISTNAME= samba-2.2.1a WRKSRC= ${WRKDIR}/${DISTNAME}/source @@ -97,10 +97,7 @@ post-extract: ${RM} -r ${WRKDIR}/${DISTNAME}/docs/textdocs/outdated pre-install: - for file in nmbd.sh smbd.sh; do \ - ${SED} ${FILES_SUBST_SED} \ - ${FILESDIR}/$${file} > ${WRKDIR}/$${file}; \ - done + ${SED} ${FILES_SUBST_SED} ${FILESDIR}/samba.sh > ${WRKDIR}/samba.sh ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} @@ -118,8 +115,7 @@ post-install: ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR} ${CHMOD} -R ugo-w ${EXAMPLESDIR} - ${INSTALL_SCRIPT} ${WRKDIR}/nmbd.sh ${PREFIX}/etc/rc.d/nmbd - ${INSTALL_SCRIPT} ${WRKDIR}/smbd.sh ${PREFIX}/etc/rc.d/smbd + ${INSTALL_SCRIPT} ${WRKDIR}/samba.sh ${PREFIX}/etc/rc.d/samba ${INSTALL_SCRIPT} ${WRKSRC}/script/convert_smbpasswd ${PREFIX}/sbin ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \ ${PREFIX}/sbin/mksmbpasswd diff --git a/net/samba/files/nmbd.sh b/net/samba/files/nmbd.sh deleted file mode 100755 index 56c0e1ca41d..00000000000 --- a/net/samba/files/nmbd.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# $NetBSD: nmbd.sh,v 1.3 2001/08/17 16:08:20 jlam Exp $ -# -# PROVIDE: nmbd -# REQUIRE: DAEMON - -name="nmbd" -command="@PREFIX@/sbin/${name}" -command_args="-D" # _must_ start as daemon from rc.d; - # add more flags through ${nmbd_flags} - -if [ ! -d /etc/rc.d ] -then - @ECHO@ -n ' ${name}' - exec ${command} ${nmbd_flags} ${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 new file mode 100644 index 00000000000..b85d6c3c2c1 --- /dev/null +++ b/net/samba/files/samba.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# +# $NetBSD: samba.sh,v 1.4 2001/08/22 15:42:18 jlam Exp $ +# +# PROVIDE: samba +# REQUIRE: DAEMON +# +# nmbd may require DNS to resolve NetBIOS hostnames, and smbd may be acting as +# a Backup Domain Controller and may need the network to be up, so simply +# require DAEMON above. +# +# To use this script, copy to /etc/rc.d and set samba=YES in /etc/rc.conf. +# You may also set nmbd_flags and smbd_flags to any additional options you +# wish to pass to the Samba daemons. + +if [ -d /etc/rc.d -a -f /etc/rc.subr ] +then + . /etc/rc.subr +fi + +arg="$1" +rcvar="samba" +required_files="@SAMBA_ETCDIR@/smb.conf" +extra_commands="reload" +command_args="-D" # _must_ start as daemon from rc.d; + # add more flags through ${${name}_flags} + +name="nmbd" +command="@PREFIX@/sbin/${name}" +reload_cmd=":" # avoid dumping debug output on SIGHUP + +if [ ! -d /etc/rc.d ] +then + @ECHO@ -n ' ${name}' + ${command} ${nmbd_flags} ${command_args} +else + load_rc_config $name + run_rc_command "$arg" +fi + +name="smbd" +command="@PREFIX@/sbin/${name}" + +if [ ! -d /etc/rc.d ] +then + @ECHO@ -n ' ${name}' + ${command} ${smbd_flags} ${command_args} +else + load_rc_config $name + run_rc_command "$1" +fi diff --git a/net/samba/files/smbd.sh b/net/samba/files/smbd.sh deleted file mode 100755 index c30ede85a05..00000000000 --- a/net/samba/files/smbd.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# $NetBSD: smbd.sh,v 1.4 2001/08/20 14:01:46 jlam Exp $ -# -# PROVIDE: smbd -# REQUIRE: nmbd - -name="smbd" -command="@PREFIX@/sbin/${name}" -command_args="-D" # _must_ start as daemon from rc.d; - # add more flags through ${smbd_flags} -extra_commands="reload" - -if [ ! -d /etc/rc.d ] -then - @ECHO@ -n ' ${name}' - exec ${command} ${smbd_flags} ${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 ace009396ae..921dd3acdbb 100644 --- a/net/samba/pkg/PLIST +++ b/net/samba/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.24 2001/07/13 16:08:41 taca Exp $ +@comment $NetBSD: PLIST,v 1.25 2001/08/22 15:42:18 jlam Exp $ bin/make_printerdef bin/make_smbcodepage bin/make_unicodemap @@ -13,8 +13,7 @@ bin/smbstatus bin/smbtar bin/testparm bin/testprns -etc/rc.d/nmbd -etc/rc.d/smbd +etc/rc.d/samba man/man1/findsmb.1 man/man1/make_smbcodepage.1 man/man1/make_unicodemap.1 diff --git a/net/samba20/Makefile b/net/samba20/Makefile index 397a3ceafdf..9e51a331437 100644 --- a/net/samba20/Makefile +++ b/net/samba20/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 2001/08/03 13:24:34 jlam Exp $ +# $NetBSD: Makefile,v 1.2 2001/08/22 15:42:19 jlam Exp $ DISTNAME= samba-2.0.10 WRKSRC= ${WRKDIR}/${DISTNAME}/source @@ -76,10 +76,7 @@ FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} MESSAGE_SUBST+= ETCDIR=${SAMBA_ETCDIR} pre-install: - for file in nmbd.sh smbd.sh; do \ - ${SED} ${FILES_SUBST_SED} \ - ${FILESDIR}/$${file} > ${WRKDIR}/$${file}; \ - done + ${SED} ${FILES_SUBST_SED} ${FILESDIR}/samba.sh > ${WRKDIR}/samba.sh ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} @@ -98,8 +95,7 @@ post-install: ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR} ${CHMOD} -R ugo-w ${EXAMPLESDIR} - ${INSTALL_SCRIPT} ${WRKDIR}/nmbd.sh ${PREFIX}/etc/rc.d/nmbd - ${INSTALL_SCRIPT} ${WRKDIR}/smbd.sh ${PREFIX}/etc/rc.d/smbd + ${INSTALL_SCRIPT} ${WRKDIR}/samba.sh ${PREFIX}/etc/rc.d/samba ${MV} ${PREFIX}/bin/convert_smbpasswd ${PREFIX}/sbin/convert_smbpasswd ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \ ${PREFIX}/sbin/mksmbpasswd diff --git a/net/samba20/files/nmbd.sh b/net/samba20/files/nmbd.sh deleted file mode 100755 index 49f5c29d7c0..00000000000 --- a/net/samba20/files/nmbd.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# $NetBSD: nmbd.sh,v 1.1.1.1 2001/08/03 13:24:36 jlam Exp $ -# -# PROVIDE: nmbd -# REQUIRE: DAEMON - -name="nmbd" -command="@PREFIX@/sbin/${name}" -command_args="-D" # _must_ start as daemon from rc.d; - # add more flags through ${nmbd_flags} - -if [ ! -d /etc/rc.d ] -then - @ECHO@ -n ' ${name}' - exec ${command} ${nmbd_flags} ${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/samba20/files/samba.sh b/net/samba20/files/samba.sh new file mode 100644 index 00000000000..fc12d201167 --- /dev/null +++ b/net/samba20/files/samba.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# +# $NetBSD: samba.sh,v 1.1 2001/08/22 15:42:19 jlam Exp $ +# +# PROVIDE: samba +# REQUIRE: DAEMON +# +# nmbd may require DNS to resolve NetBIOS hostnames, and smbd may be acting as +# a Backup Domain Controller and may need the network to be up, so simply +# require DAEMON above. +# +# To use this script, copy to /etc/rc.d and set samba=YES in /etc/rc.conf. +# You may also set nmbd_flags and smbd_flags to any additional options you +# wish to pass to the Samba daemons. + +if [ -d /etc/rc.d -a -f /etc/rc.subr ] +then + . /etc/rc.subr +fi + +arg="$1" +rcvar="samba" +required_files="@SAMBA_ETCDIR@/smb.conf" +extra_commands="reload" +command_args="-D" # _must_ start as daemon from rc.d; + # add more flags through ${${name}_flags} + +name="nmbd" +command="@PREFIX@/sbin/${name}" +reload_cmd=":" # avoid dumping debug output on SIGHUP + +if [ ! -d /etc/rc.d ] +then + @ECHO@ -n ' ${name}' + ${command} ${nmbd_flags} ${command_args} +else + load_rc_config $name + run_rc_command "$arg" +fi + +name="smbd" +command="@PREFIX@/sbin/${name}" + +if [ ! -d /etc/rc.d ] +then + @ECHO@ -n ' ${name}' + ${command} ${smbd_flags} ${command_args} +else + load_rc_config $name + run_rc_command "$1" +fi diff --git a/net/samba20/files/smbd.sh b/net/samba20/files/smbd.sh deleted file mode 100755 index cc7a8a70517..00000000000 --- a/net/samba20/files/smbd.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# $NetBSD: smbd.sh,v 1.2 2001/08/20 14:01:46 jlam Exp $ -# -# PROVIDE: smbd -# REQUIRE: nmbd - -name="smbd" -command="@PREFIX@/sbin/${name}" -command_args="-D" # _must_ start as daemon from rc.d; - # add more flags through ${smbd_flags} -extra_commands="reload" - -if [ ! -d /etc/rc.d ] -then - @ECHO@ -n ' ${name}' - exec ${command} ${smbd_flags} ${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/samba20/pkg/PLIST b/net/samba20/pkg/PLIST index ce381c7e93b..183f539ea6a 100644 --- a/net/samba20/pkg/PLIST +++ b/net/samba20/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2001/08/03 13:24:36 jlam Exp $ +@comment $NetBSD: PLIST,v 1.2 2001/08/22 15:42:19 jlam Exp $ bin/addtosmbpass bin/make_printerdef bin/make_smbcodepage @@ -12,8 +12,7 @@ bin/smbstatus bin/smbtar bin/testparm bin/testprns -etc/rc.d/nmbd -etc/rc.d/smbd +etc/rc.d/samba man/man1/make_smbcodepage.1 man/man1/make_unicodemap.1 man/man1/nmblookup.1 |