diff --git a/Makefile b/Makefile index b359660..7c56937 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/tools/netbsd/DaMon b/tools/netbsd/DaMon new file mode 100755 index 0000000..f53e520 --- /dev/null +++ b/tools/netbsd/DaMon @@ -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" diff --git a/tools/netbsd/Makefile b/tools/netbsd/Makefile new file mode 100644 index 0000000..f46489b --- /dev/null +++ b/tools/netbsd/Makefile @@ -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 diff --git a/tools/netbsd/Probe b/tools/netbsd/Probe new file mode 100755 index 0000000..2192a4c --- /dev/null +++ b/tools/netbsd/Probe @@ -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" diff --git a/tools/netbsd/project.conf b/tools/netbsd/project.conf new file mode 100644 index 0000000..023e674 --- /dev/null +++ b/tools/netbsd/project.conf @@ -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 diff --git a/tools/project.conf b/tools/project.conf index 6932c00..641daea 100644 --- a/tools/project.conf +++ b/tools/project.conf @@ -1 +1 @@ -dist=Makefile,create.sh +dist=Makefile,create.sh,netbsd/project.conf,netbsd/Makefile,netbsd/DaMon,netbsd/Probe