2013-03-19 04:59:36 +05:30
|
|
|
include ../mk/net.mk
|
|
|
|
|
2013-04-08 23:16:51 +05:30
|
|
|
BOOT= bootmisc fsck hostname localmount loopback \
|
2012-07-10 12:29:28 +05:30
|
|
|
root swap swapfiles sysctl urandom ${BOOT-${OS}}
|
2008-01-10 22:05:59 +05:30
|
|
|
DEFAULT= local netmount
|
2011-10-20 07:00:39 +05:30
|
|
|
SHUTDOWN= savecache ${SHUTDOWN-${OS}}
|
|
|
|
SYSINIT= ${SYSINIT-${OS}}
|
2007-04-05 16:48:42 +05:30
|
|
|
|
2008-03-25 22:39:56 +05:30
|
|
|
LEVELDIR= ${DESTDIR}/${SYSCONFDIR}/runlevels
|
2008-10-10 14:07:21 +05:30
|
|
|
SYSINITDIR= ${LEVELDIR}/sysinit
|
2008-01-10 22:05:59 +05:30
|
|
|
BOOTDIR= ${LEVELDIR}/boot
|
|
|
|
DEFAULTDIR= ${LEVELDIR}/default
|
2008-11-03 21:01:01 +05:30
|
|
|
SHUTDOWNDIR= ${LEVELDIR}/shutdown
|
2007-11-19 22:12:28 +05:30
|
|
|
|
2013-03-19 04:59:36 +05:30
|
|
|
ifeq (${MKNET},yes)
|
2012-07-10 12:29:28 +05:30
|
|
|
BOOT+= network staticroute
|
|
|
|
endif
|
|
|
|
|
2012-09-29 20:19:48 +05:30
|
|
|
INITFILES= ../init.d
|
2012-07-09 01:32:11 +05:30
|
|
|
|
2008-01-10 22:05:59 +05:30
|
|
|
MK= ../mk
|
2008-01-11 21:33:38 +05:30
|
|
|
include ${MK}/sys.mk
|
2008-01-11 15:02:06 +05:30
|
|
|
include ${MK}/os.mk
|
2009-04-30 19:35:39 +05:30
|
|
|
include ${MK}/gitignore.mk
|
2011-10-18 06:48:39 +05:30
|
|
|
|
2011-10-20 07:00:39 +05:30
|
|
|
BOOT-${OS}=
|
|
|
|
SHUTDOWN-${OS}=
|
|
|
|
SYSINIT-${OS}=
|
|
|
|
|
|
|
|
BOOT-BSD= hostid newsyslog savecore syslogd swap-blk
|
2011-10-18 06:48:39 +05:30
|
|
|
|
|
|
|
# Generic BSD stuff
|
2012-07-10 22:48:06 +05:30
|
|
|
BOOT-FreeBSD+= hostid newsyslog savecore syslogd
|
2011-10-20 07:00:39 +05:30
|
|
|
# FreeBSD specific stuff
|
|
|
|
BOOT-FreeBSD+= adjkerntz dumpon syscons
|
|
|
|
|
2015-03-31 23:18:45 +05:30
|
|
|
BOOT-Linux+= binfmt hwclock keymaps modules mtab procfs termencoding \
|
|
|
|
tmpfiles.setup
|
2011-10-20 07:00:39 +05:30
|
|
|
SHUTDOWN-Linux= killprocs mount-ro
|
2013-07-25 23:03:03 +05:30
|
|
|
SYSINIT-Linux= devfs dmesg sysfs tmpfiles.dev
|
2011-10-18 06:48:39 +05:30
|
|
|
|
2011-10-20 07:00:39 +05:30
|
|
|
# Generic BSD stuff
|
2012-07-10 22:48:06 +05:30
|
|
|
BOOT-NetBSD+= hostid newsyslog savecore syslogd
|
2011-10-18 06:48:39 +05:30
|
|
|
# NetBSD specific stuff
|
2011-10-20 07:00:39 +05:30
|
|
|
BOOT-NetBSD+= devdb swap-blk ttys wscons
|
2008-01-11 15:02:06 +05:30
|
|
|
|
2008-01-11 15:12:28 +05:30
|
|
|
all:
|
|
|
|
|
|
|
|
install:
|
2008-10-10 14:07:21 +05:30
|
|
|
if ! test -d "${SYSINITDIR}"; then \
|
|
|
|
${INSTALL} -d ${SYSINITDIR} || exit $$?; \
|
|
|
|
for x in ${SYSINIT}; do \
|
2013-02-12 08:43:29 +05:30
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 20:19:48 +05:30
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-03 08:34:22 +05:30
|
|
|
fi; \
|
2012-09-29 20:19:48 +05:30
|
|
|
ln -snf ${INITDIR}/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \
|
2008-10-10 14:07:21 +05:30
|
|
|
fi
|
2008-01-11 15:12:28 +05:30
|
|
|
if ! test -d "${BOOTDIR}"; then \
|
|
|
|
${INSTALL} -d ${BOOTDIR} || exit $$?; \
|
2008-03-03 02:44:01 +05:30
|
|
|
for x in ${BOOT}; do \
|
2013-02-12 08:43:29 +05:30
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 20:19:48 +05:30
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-03 08:34:22 +05:30
|
|
|
fi; \
|
2012-09-29 20:19:48 +05:30
|
|
|
ln -snf ${INITDIR}/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \
|
2008-03-03 02:44:01 +05:30
|
|
|
done \
|
2008-01-11 15:12:28 +05:30
|
|
|
fi
|
|
|
|
if ! test -d "${DEFAULTDIR}"; then \
|
|
|
|
${INSTALL} -d ${DEFAULTDIR} || exit $$?; \
|
2008-03-03 02:44:01 +05:30
|
|
|
for x in ${DEFAULT}; do \
|
2013-02-12 08:43:29 +05:30
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 20:19:48 +05:30
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-03 08:34:22 +05:30
|
|
|
fi; \
|
2012-09-29 20:19:48 +05:30
|
|
|
ln -snf ${INITDIR}/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \
|
2008-01-11 15:12:28 +05:30
|
|
|
fi
|
2008-11-03 21:01:01 +05:30
|
|
|
if ! test -d "${SHUTDOWNDIR}"; then \
|
|
|
|
${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \
|
|
|
|
for x in ${SHUTDOWN}; do \
|
2013-02-12 08:43:29 +05:30
|
|
|
if test "${MKPREFIX}" = yes; then \
|
2012-09-29 20:19:48 +05:30
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
2012-07-03 08:34:22 +05:30
|
|
|
fi; \
|
2012-09-29 20:19:48 +05:30
|
|
|
ln -snf ${INITDIR}/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
|
2008-11-03 21:01:01 +05:30
|
|
|
fi
|
2008-01-11 15:12:28 +05:30
|
|
|
|
2008-03-24 11:40:40 +05:30
|
|
|
check test::
|
|
|
|
|
2008-01-11 15:12:28 +05:30
|
|
|
clean:
|