2013-04-08 12:46:51 -05:00
|
|
|
BOOT= bootmisc fsck hostname localmount loopback \
|
2012-07-10 01:59:28 -05:00
|
|
|
root swap swapfiles 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
|
|
|
|
2012-07-10 01:59:28 -05:00
|
|
|
ifeq (${MKNET},)
|
|
|
|
BOOT+= network staticroute
|
|
|
|
endif
|
|
|
|
|
2012-09-29 10:49:48 -04:00
|
|
|
INITFILES= ../init.d
|
2012-07-08 15:02:11 -05: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}=
|
|
|
|
|
2012-07-10 12:18:06 -05:00
|
|
|
ifeq (${MKNET},oldnet)
|
|
|
|
BOOT-FreeBSD+= net.lo0
|
|
|
|
BOOT-Linux+= net.lo
|
|
|
|
BOOT-NetBSD+= net.lo0
|
|
|
|
endif
|
|
|
|
|
2011-10-19 21:30:39 -04:00
|
|
|
BOOT-BSD= hostid newsyslog savecore syslogd swap-blk
|
2011-10-17 20:18:39 -05:00
|
|
|
|
|
|
|
# Generic BSD stuff
|
2012-07-10 12:18:06 -05:00
|
|
|
BOOT-FreeBSD+= hostid newsyslog savecore syslogd
|
2011-10-19 21:30:39 -04:00
|
|
|
# FreeBSD specific stuff
|
|
|
|
BOOT-FreeBSD+= adjkerntz dumpon syscons
|
|
|
|
|
2012-10-31 10:53:37 -05:00
|
|
|
BOOT-Linux+= hwclock keymaps modules mtab procfs termencoding tmpfiles.setup
|
2011-10-19 21:30:39 -04:00
|
|
|
SHUTDOWN-Linux= killprocs mount-ro
|
2012-10-31 10:53:37 -05:00
|
|
|
SYSINIT-Linux= devfs dmesg sysfs
|
2011-10-17 20:18:39 -05:00
|
|
|
|
2011-10-19 21:30:39 -04:00
|
|
|
# Generic BSD stuff
|
2012-07-10 12:18:06 -05:00
|
|
|
BOOT-NetBSD+= hostid 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 \
|
2013-02-11 22:13:29 -05:00
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 10:49:48 -04:00
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-02 22:04:22 -05:00
|
|
|
fi; \
|
2012-09-29 10:49:48 -04:00
|
|
|
ln -snf ${INITDIR}/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \
|
2008-10-10 08:37:21 +00:00
|
|
|
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 \
|
2013-02-11 22:13:29 -05:00
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 10:49:48 -04:00
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-02 22:04:22 -05:00
|
|
|
fi; \
|
2012-09-29 10:49:48 -04:00
|
|
|
ln -snf ${INITDIR}/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \
|
2008-03-02 21:14:01 +00:00
|
|
|
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 \
|
2013-02-11 22:13:29 -05:00
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 10:49:48 -04:00
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-02 22:04:22 -05:00
|
|
|
fi; \
|
2012-09-29 10:49:48 -04:00
|
|
|
ln -snf ${INITDIR}/"$$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 \
|
2013-02-11 22:13:29 -05:00
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 10:49:48 -04:00
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-02 22:04:22 -05:00
|
|
|
fi; \
|
2012-09-29 10:49:48 -04:00
|
|
|
ln -snf ${INITDIR}/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
|
2008-11-03 15:31:01 +00:00
|
|
|
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:
|