2009-05-23 20:38:12 +01:00
|
|
|
DIR= ${LIBEXECDIR}/sh
|
2008-06-21 14:10:59 +00:00
|
|
|
SRCS= functions.sh.in gendepends.sh.in init-common-post.sh.in \
|
2008-03-03 12:34:51 +00:00
|
|
|
rc-functions.sh.in runscript.sh.in
|
2008-02-27 20:29:32 +00:00
|
|
|
INC= init-common-post.sh rc-mount.sh functions.sh rc-functions.sh
|
2008-04-29 10:25:45 +00:00
|
|
|
BIN= gendepends.sh init.sh runscript.sh
|
2007-04-05 11:18:42 +00:00
|
|
|
|
2008-01-13 17:49:29 +00:00
|
|
|
INSTALLAFTER= _installafter
|
|
|
|
|
2008-01-10 16:35:59 +00:00
|
|
|
MK= ../mk
|
2008-03-25 14:06:05 +00:00
|
|
|
include ${MK}/os.mk
|
2011-10-17 20:18:39 -05:00
|
|
|
|
2011-10-19 12:22:23 -05:00
|
|
|
ifeq (${OS},FreeBSD)
|
2011-10-17 20:18:39 -05:00
|
|
|
SRCS+= init.sh.in
|
|
|
|
|
|
|
|
.SUFFIXES: .sh.BSD.in
|
|
|
|
.sh.BSD.in.sh:
|
|
|
|
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
|
|
|
2011-10-19 12:22:23 -05:00
|
|
|
else ifeq (${OS},Linux)
|
2011-10-17 20:18:39 -05:00
|
|
|
SRCS+= init.sh.in init-early.sh.in udhcpc-hook.sh.in
|
|
|
|
BIN+= init-early.sh udhcpc-hook.sh
|
|
|
|
|
|
|
|
.SUFFIXES: .sh.Linux.in
|
|
|
|
.sh.Linux.in.sh:
|
|
|
|
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
|
|
|
2011-10-19 12:22:23 -05:00
|
|
|
else ifeq (${OS},NetBSD)
|
2011-10-17 20:18:39 -05:00
|
|
|
SRCS+= init.sh.in
|
|
|
|
|
|
|
|
SRCS+= ifwatchd-carrier.sh.in ifwatchd-nocarrier.sh.in
|
|
|
|
BIN+= ifwatchd-carrier.sh ifwatchd-nocarrier.sh
|
|
|
|
|
|
|
|
.SUFFIXES: .sh.BSD.in
|
|
|
|
.sh.BSD.in.sh:
|
|
|
|
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
|
|
endif
|
|
|
|
|
2008-01-10 16:57:05 +00:00
|
|
|
include ${MK}/scripts.mk
|
|
|
|
|
2008-01-10 16:35:59 +00:00
|
|
|
_installafter:
|
2008-03-25 17:19:41 +00:00
|
|
|
${INSTALL} -d ${DESTDIR}/${INITDIR}
|
2011-06-27 12:11:01 -05:00
|
|
|
@# Put functions.sh into init for backwards compat
|
|
|
|
ln -snf ${LIBEXECDIR}/sh/functions.sh ${DESTDIR}/${INITDIR} || exit $$?
|
2008-03-24 07:17:05 +00:00
|
|
|
|
|
|
|
check test::
|
|
|
|
./runtests.sh
|