2011-11-15 17:06:10 -06:00
|
|
|
BOOT= bootmisc fsck hostname localmount \
|
|
|
|
root swap sysctl urandom ${BOOT-${OS}}
|
2008-01-10 16:35:59 +00:00
|
|
|
DEFAULT= local netmount
|
2011-10-19 21:30:39 -04:00
|
|
|
SHUTDOWN= savecache ${SHUTDOWN-${OS}}
|
|
|
|
SYSINIT= ${SYSINIT-${OS}}
|
2007-04-05 11:18:42 +00:00
|
|
|
|
2008-03-25 17:09:56 +00:00
|
|
|
LEVELDIR= ${DESTDIR}/${SYSCONFDIR}/runlevels
|
2008-10-10 08:37:21 +00:00
|
|
|
SYSINITDIR= ${LEVELDIR}/sysinit
|
2008-01-10 16:35:59 +00:00
|
|
|
BOOTDIR= ${LEVELDIR}/boot
|
|
|
|
DEFAULTDIR= ${LEVELDIR}/default
|
2008-11-03 15:31:01 +00:00
|
|
|
SHUTDOWNDIR= ${LEVELDIR}/shutdown
|
2007-11-19 16:42:28 +00:00
|
|
|
|
2008-01-10 16:35:59 +00:00
|
|
|
MK= ../mk
|
2008-01-11 16:03:38 +00:00
|
|
|
include ${MK}/sys.mk
|
2008-01-11 09:32:06 +00:00
|
|
|
include ${MK}/os.mk
|
2009-04-30 15:05:39 +01:00
|
|
|
include ${MK}/gitignore.mk
|
2011-10-17 20:18:39 -05:00
|
|
|
|
2011-10-19 21:30:39 -04:00
|
|
|
BOOT-${OS}=
|
|
|
|
SHUTDOWN-${OS}=
|
|
|
|
SYSINIT-${OS}=
|
|
|
|
|
|
|
|
BOOT-BSD= hostid newsyslog savecore syslogd swap-blk
|
2011-10-17 20:18:39 -05:00
|
|
|
|
|
|
|
# Generic BSD stuff
|
2011-10-19 21:30:39 -04:00
|
|
|
BOOT-FreeBSD= hostid net.lo0 newsyslog savecore syslogd
|
|
|
|
# FreeBSD specific stuff
|
|
|
|
BOOT-FreeBSD+= adjkerntz dumpon syscons
|
|
|
|
|
2011-11-30 10:00:44 -06:00
|
|
|
BOOT-Linux= hwclock keymaps modules mtab net.lo procfs termencoding
|
2011-10-19 21:30:39 -04:00
|
|
|
SHUTDOWN-Linux= killprocs mount-ro
|
|
|
|
SYSINIT-Linux= devfs dmesg
|
2011-10-17 20:18:39 -05:00
|
|
|
|
2011-10-19 21:30:39 -04:00
|
|
|
# Generic BSD stuff
|
|
|
|
BOOT-NetBSD= hostid net.lo0 newsyslog savecore syslogd
|
2011-10-17 20:18:39 -05:00
|
|
|
# NetBSD specific stuff
|
2011-10-19 21:30:39 -04:00
|
|
|
BOOT-NetBSD+= devdb swap-blk ttys wscons
|
2008-01-11 09:32:06 +00:00
|
|
|
|
2008-01-11 09:42:28 +00:00
|
|
|
all:
|
|
|
|
|
|
|
|
install:
|
2008-10-10 08:37:21 +00:00
|
|
|
if ! test -d "${SYSINITDIR}"; then \
|
|
|
|
${INSTALL} -d ${SYSINITDIR} || exit $$?; \
|
|
|
|
for x in ${SYSINIT}; do \
|
|
|
|
if test -n "${PREFIX}"; then \
|
|
|
|
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
|
|
|
|
fi; \
|
|
|
|
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \
|
|
|
|
fi
|
2008-01-11 09:42:28 +00:00
|
|
|
if ! test -d "${BOOTDIR}"; then \
|
|
|
|
${INSTALL} -d ${BOOTDIR} || exit $$?; \
|
2008-03-02 21:14:01 +00:00
|
|
|
for x in ${BOOT}; do \
|
|
|
|
if test -n "${PREFIX}"; then \
|
2008-03-27 19:55:03 +00:00
|
|
|
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
|
2008-03-02 21:14:01 +00:00
|
|
|
fi; \
|
|
|
|
ln -snf ${PREFIX}/etc/init.d/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \
|
|
|
|
done \
|
2008-01-11 09:42:28 +00:00
|
|
|
fi
|
|
|
|
if ! test -d "${DEFAULTDIR}"; then \
|
|
|
|
${INSTALL} -d ${DEFAULTDIR} || exit $$?; \
|
2008-03-02 21:14:01 +00:00
|
|
|
for x in ${DEFAULT}; do \
|
|
|
|
if test -n "${PREFIX}"; then \
|
2008-03-27 19:55:03 +00:00
|
|
|
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
|
2008-03-02 21:14:01 +00:00
|
|
|
fi; \
|
|
|
|
ln -snf ${PREFIX}/etc/init.d/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \
|
2008-01-11 09:42:28 +00:00
|
|
|
fi
|
2008-11-03 15:31:01 +00:00
|
|
|
if ! test -d "${SHUTDOWNDIR}"; then \
|
|
|
|
${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \
|
|
|
|
for x in ${SHUTDOWN}; do \
|
|
|
|
if test -n "${PREFIX}"; then \
|
|
|
|
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
|
|
|
|
fi; \
|
|
|
|
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
|
|
|
|
fi
|
2008-01-11 09:42:28 +00:00
|
|
|
|
2008-03-24 06:10:40 +00:00
|
|
|
check test::
|
|
|
|
|
2008-01-11 09:42:28 +00:00
|
|
|
clean:
|