Replace monolithic old style startup script with two new style startup

scripts which include backward compatibility for pre 1.5 systems.
This commit is contained in:
tron 2001-02-04 15:29:58 +00:00
parent b2c913eb65
commit 43db17d3e2
5 changed files with 61 additions and 20 deletions

View file

@ -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' \

24
net/samba/files/nmbd.sh Executable file
View file

@ -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"

View file

@ -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

24
net/samba/files/smbd.sh Executable file
View file

@ -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"

View file

@ -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