Added init scripts for NetBSD

This commit is contained in:
Pierre Pronchery 2010-04-15 13:00:02 +00:00
parent 7d1f325e24
commit 4516a1848e
6 changed files with 82 additions and 1 deletions

View File

@ -31,6 +31,10 @@ dist:
$(PACKAGE)-$(VERSION)/src/project.conf \
$(PACKAGE)-$(VERSION)/tools/Makefile \
$(PACKAGE)-$(VERSION)/tools/create.sh \
$(PACKAGE)-$(VERSION)/tools/netbsd/project.conf \
$(PACKAGE)-$(VERSION)/tools/netbsd/Makefile \
$(PACKAGE)-$(VERSION)/tools/netbsd/DaMon \
$(PACKAGE)-$(VERSION)/tools/netbsd/Probe \
$(PACKAGE)-$(VERSION)/tools/project.conf \
$(PACKAGE)-$(VERSION)/Makefile \
$(PACKAGE)-$(VERSION)/COPYING \

23
tools/netbsd/DaMon Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $NetBSD$
#
# PROVIDE: DaMon
# REQUIRE: Probe
# KEYWORD: shutdown
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name="DaMon"
rcvar=$name
command="/usr/local/bin/DaMon"
command_args="&"
required_files="/usr/local/etc/$name.conf"
DaMon_chdir="/home/damon"
DaMon_user="damon"
load_rc_config $name
run_rc_command "$1"

24
tools/netbsd/Makefile Normal file
View File

@ -0,0 +1,24 @@
PREFIX = /usr/local
DESTDIR =
MKDIR = mkdir -p
INSTALL = install
RM = rm -f
all:
clean:
distclean: clean
install: all
$(MKDIR) $(DESTDIR)$(PREFIX)/share/examples/rc.d
$(INSTALL) -m 0555 DaMon $(DESTDIR)$(PREFIX)/share/examples/rc.d/DaMon
$(MKDIR) $(DESTDIR)$(PREFIX)/share/examples/rc.d
$(INSTALL) -m 0555 Probe $(DESTDIR)$(PREFIX)/share/examples/rc.d/Probe
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/share/examples/rc.d/DaMon
$(RM) $(DESTDIR)$(PREFIX)/share/examples/rc.d/Probe
.PHONY: all clean distclean install uninstall

21
tools/netbsd/Probe Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
#
# $NetBSD$
#
# PROVIDE: Probe
# REQUIRE: DAEMON
# KEYWORD: shutdown
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name="Probe"
rcvar=$name
command="/usr/local/bin/Probe"
command_args="&"
Probe_user="probe"
load_rc_config $name
run_rc_command "$1"

View File

@ -0,0 +1,9 @@
dist=DaMon,Probe
[DaMon]
install=$(PREFIX)/share/examples/rc.d
mode=0555
[Probe]
install=$(PREFIX)/share/examples/rc.d
mode=0555

View File

@ -1 +1 @@
dist=Makefile,create.sh
dist=Makefile,create.sh,netbsd/project.conf,netbsd/Makefile,netbsd/DaMon,netbsd/Probe