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 \
|
2016-09-04 00:34:03 +05:30
|
|
|
root swap sysctl urandom ${BOOT-${OS}}
|
2008-01-10 22:05:59 +05:30
|
|
|
DEFAULT= local netmount
|
2016-05-13 03:18:15 +05:30
|
|
|
NONETWORK= local
|
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
|
2016-05-13 03:18:15 +05:30
|
|
|
NONETWORKDIR= ${LEVELDIR}/nonetwork
|
2008-11-03 21:01:01 +05:30
|
|
|
SHUTDOWNDIR= ${LEVELDIR}/shutdown
|
2019-07-30 02:54:52 +05:30
|
|
|
SINGLEDIR= ${LEVELDIR}/single
|
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
|
2016-07-18 01:23:12 +05:30
|
|
|
BOOT-FreeBSD+= hostid modules newsyslog savecore syslogd
|
2011-10-20 07:00:39 +05:30
|
|
|
# FreeBSD specific stuff
|
|
|
|
BOOT-FreeBSD+= adjkerntz dumpon syscons
|
|
|
|
|
2018-11-07 04:04:14 +05:30
|
|
|
BOOT-Linux+= binfmt hwclock keymaps modules mtab procfs save-keymaps \
|
|
|
|
save-termencoding termencoding
|
2011-10-20 07:00:39 +05:30
|
|
|
SHUTDOWN-Linux= killprocs mount-ro
|
2017-11-29 04:44:33 +05:30
|
|
|
SYSINIT-Linux= devfs cgroups dmesg sysfs
|
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
|
2016-05-13 03:18:15 +05:30
|
|
|
if ! test -d "${NONETWORKDIR}"; then \
|
|
|
|
${INSTALL} -d ${NONETWORKDIR} || exit $$?; \
|
|
|
|
for x in ${NONETWORK}; do \
|
|
|
|
if test "${MKPREFIX}" = yes; then \
|
|
|
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
|
|
|
fi; \
|
|
|
|
ln -snf ${INITDIR}/"$$x" ${NONETWORKDIR}/"$$x" || exit $$?; done \
|
|
|
|
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
|
2019-07-30 02:54:52 +05:30
|
|
|
if ! test -d "${SINGLEDIR}"; then \
|
|
|
|
${INSTALL} -d ${SINGLEDIR} || exit $$?; \
|
|
|
|
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:
|