aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-25 14:06:05 +0000
committerRoy Marples <roy@marples.name>2008-03-25 14:06:05 +0000
commit55eb3794fb4ad563102d5ab30c1d5337a599b2e5 (patch)
tree0d052faeb050c1e18ba56f6f6189bff3ffca28c9
parent08aff6ef44ac5dc438d916b53aa61385f6d299f3 (diff)
Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS.
-rw-r--r--conf.d.BSD/Makefile5
-rw-r--r--conf.d.FreeBSD/Makefile5
-rw-r--r--conf.d.Linux/Makefile6
-rw-r--r--conf.d.Linux/clock9
-rw-r--r--conf.d/Makefile2
-rw-r--r--conf.d/Makefile.FreeBSD1
-rw-r--r--conf.d/Makefile.Linux1
-rw-r--r--conf.d/Makefile.NetBSD1
-rw-r--r--conf.d/adjkerntz (renamed from conf.d/clock)0
-rw-r--r--conf.d/consolefont (renamed from conf.d.Linux/consolefont)0
-rw-r--r--conf.d/hwclock14
-rw-r--r--conf.d/keymaps (renamed from conf.d.Linux/keymaps)0
-rw-r--r--conf.d/modules (renamed from conf.d.Linux/modules)0
-rw-r--r--conf.d/moused (renamed from conf.d.BSD/moused)0
-rw-r--r--conf.d/powerd (renamed from conf.d.BSD/powerd)0
-rw-r--r--conf.d/rarpd (renamed from conf.d.BSD/rarpd)0
-rw-r--r--conf.d/savecore (renamed from conf.d.BSD/localmount)20
-rw-r--r--conf.d/syscons (renamed from conf.d.FreeBSD/syscons)0
-rw-r--r--etc.BSD/.gitignore2
-rw-r--r--etc.BSD/Makefile10
-rw-r--r--etc.BSD/Makefile.FreeBSD1
-rw-r--r--etc.BSD/Makefile.NetBSD1
-rw-r--r--etc.FreeBSD/Makefile6
-rw-r--r--etc.Linux/Makefile5
-rw-r--r--etc/Makefile2
-rw-r--r--etc/Makefile.FreeBSD4
-rw-r--r--etc/Makefile.Linux6
-rw-r--r--etc/Makefile.NetBSD2
-rw-r--r--etc/devd.conf (renamed from etc.FreeBSD/devd.conf)0
-rw-r--r--etc/rc.conf.Linux (renamed from etc.Linux/rc.conf)0
-rw-r--r--etc/rc.conf.in (renamed from etc/rc.conf)0
-rw-r--r--etc/rc.devd (renamed from etc.FreeBSD/rc.devd)0
-rw-r--r--etc/rc.in (renamed from etc.BSD/rc.in)0
-rw-r--r--etc/rc.shutdown.in (renamed from etc.BSD/rc.shutdown.in)0
-rw-r--r--init.d.BSD/.gitignore10
-rw-r--r--init.d.BSD/Makefile7
-rw-r--r--init.d.FreeBSD/.gitignore8
-rw-r--r--init.d.FreeBSD/Makefile6
-rw-r--r--init.d.Linux/.gitignore8
-rw-r--r--init.d.Linux/Makefile7
-rw-r--r--init.d.Linux/sysctl.in18
-rw-r--r--init.d.NetBSD/.gitignore3
-rw-r--r--init.d.NetBSD/Makefile6
-rw-r--r--init.d/Makefile4
-rw-r--r--init.d/Makefile.FreeBSD1
-rw-r--r--init.d/Makefile.Linux2
-rw-r--r--init.d/Makefile.NetBSD6
-rw-r--r--init.d/adjkerntz.in (renamed from init.d.FreeBSD/clock.in)1
-rw-r--r--init.d/consolefont.in (renamed from init.d.Linux/consolefont.in)0
-rw-r--r--init.d/devd.in (renamed from init.d.FreeBSD/devd.in)0
-rw-r--r--init.d/dumpon.in (renamed from init.d.FreeBSD/dumpon.in)0
-rw-r--r--init.d/hostid.in (renamed from init.d.BSD/hostid.in)0
-rw-r--r--init.d/hwclock.in (renamed from init.d.Linux/clock.in)1
-rw-r--r--init.d/ipfw.in (renamed from init.d.FreeBSD/ipfw.in)0
-rw-r--r--init.d/keymaps.in (renamed from init.d.Linux/keymaps.in)0
-rw-r--r--init.d/mixer.in (renamed from init.d.FreeBSD/mixer.in)0
-rw-r--r--init.d/modules.in (renamed from init.d.Linux/modules.in)0
-rw-r--r--init.d/moused.in (renamed from init.d.BSD/moused.in)0
-rw-r--r--init.d/mtab.in (renamed from init.d.Linux/mtab.in)0
-rw-r--r--init.d/newsyslog.in (renamed from init.d.BSD/newsyslog.in)0
-rw-r--r--init.d/nscd.in (renamed from init.d.FreeBSD/nscd.in)0
-rw-r--r--init.d/numlock.in (renamed from init.d.Linux/numlock.in)0
-rw-r--r--init.d/pf.in (renamed from init.d.BSD/pf.in)0
-rw-r--r--init.d/powerd.in (renamed from init.d.FreeBSD/powerd.in)0
-rw-r--r--init.d/procfs.in (renamed from init.d.Linux/procfs.in)0
-rw-r--r--init.d/rarpd.in (renamed from init.d.BSD/rarpd.in)0
-rw-r--r--init.d/rc-enabled.in (renamed from init.d.BSD/rc-enabled.in)0
-rw-r--r--init.d/rpcbind.in (renamed from init.d.BSD/rpcbind.in)0
-rw-r--r--init.d/savecore.in (renamed from init.d.BSD/savecore.in)0
-rw-r--r--init.d/swap-blk.in (renamed from init.d.NetBSD/swap-blk.in)0
-rw-r--r--init.d/syscons.in (renamed from init.d.FreeBSD/syscons.in)0
-rw-r--r--init.d/sysctl.in (renamed from init.d.BSD/sysctl.in)0
-rw-r--r--init.d/syslogd.in (renamed from init.d.BSD/syslogd.in)0
-rw-r--r--init.d/ttys.in (renamed from init.d.NetBSD/ttys.in)0
-rw-r--r--init.d/wscons.in (renamed from init.d.NetBSD/wscons.in)0
-rw-r--r--mk/scripts.mk31
-rw-r--r--net.NetBSD/Makefile5
-rw-r--r--net/Makefile2
-rw-r--r--net/Makefile.FreeBSD0
-rw-r--r--net/Makefile.Linux0
-rw-r--r--net/Makefile.NetBSD1
-rw-r--r--net/ifwatchd.sh (renamed from net.NetBSD/ifwatchd.sh)0
-rw-r--r--runlevels/Makefile1
-rw-r--r--runlevels/Makefile.FreeBSD6
-rw-r--r--runlevels/Makefile.Linux2
-rw-r--r--runlevels/Makefile.NetBSD6
-rw-r--r--sh.BSD/.gitignore1
-rw-r--r--sh.BSD/Makefile6
-rw-r--r--sh.Linux/.gitignore2
-rw-r--r--sh.Linux/Makefile6
-rw-r--r--sh.NetBSD/.gitignore2
-rw-r--r--sh.NetBSD/Makefile6
-rw-r--r--sh/Makefile6
-rw-r--r--sh/Makefile.BSD1
-rw-r--r--sh/Makefile.FreeBSD8
-rw-r--r--sh/Makefile.Linux9
-rw-r--r--sh/Makefile.NetBSD10
-rw-r--r--sh/ifwatchd-carrier.sh.in (renamed from sh.NetBSD/ifwatchd-carrier.sh.in)0
-rw-r--r--sh/ifwatchd-nocarrier.sh.in (renamed from sh.NetBSD/ifwatchd-nocarrier.sh.in)0
-rw-r--r--sh/init-early.Linux.sh.in (renamed from sh.Linux/init-early.sh.in)0
-rw-r--r--sh/init.BSD.sh.in (renamed from sh.BSD/init.sh.in)0
-rw-r--r--sh/init.Linux.sh.in (renamed from sh.Linux/init.sh.in)0
102 files changed, 114 insertions, 188 deletions
diff --git a/conf.d.BSD/Makefile b/conf.d.BSD/Makefile
deleted file mode 100644
index 7131f675..00000000
--- a/conf.d.BSD/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-DIR= ${CONFDIR}
-CONF= localmount moused powerd rarpd
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/conf.d.FreeBSD/Makefile b/conf.d.FreeBSD/Makefile
deleted file mode 100644
index ed58826f..00000000
--- a/conf.d.FreeBSD/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-DIR= ${CONFDIR}
-CONF= syscons
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/conf.d.Linux/Makefile b/conf.d.Linux/Makefile
deleted file mode 100644
index 57922a20..00000000
--- a/conf.d.Linux/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= ${CONFDIR}
-CONF= consolefont keymaps modules
-CONF_APPEND= clock
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/conf.d.Linux/clock b/conf.d.Linux/clock
deleted file mode 100644
index 4a5cb84c..00000000
--- a/conf.d.Linux/clock
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# Set clock_adjtime if you wish hwclock to try and handle clock drift.
-# Don't set this if you run a ntp service or anything else that handles
-# clock drift.
-clock_adjtime="NO"
-
-# If you wish to pass any other arguments to hwclock during bootup,
-# you may do so here. Alpha users may wish to use --arc or --srm here.
-clock_args=""
diff --git a/conf.d/Makefile b/conf.d/Makefile
index 9d1891f5..96b0a6eb 100644
--- a/conf.d/Makefile
+++ b/conf.d/Makefile
@@ -1,5 +1,5 @@
DIR= ${CONFDIR}
-CONF= bootmisc clock fsck hostname local net urandom
+CONF= bootmisc fsck hostname local net urandom
MK= ../mk
include ${MK}/scripts.mk
diff --git a/conf.d/Makefile.FreeBSD b/conf.d/Makefile.FreeBSD
new file mode 100644
index 00000000..ea0c701e
--- /dev/null
+++ b/conf.d/Makefile.FreeBSD
@@ -0,0 +1 @@
+CONF+= moused powerd rarpd savecore syscons
diff --git a/conf.d/Makefile.Linux b/conf.d/Makefile.Linux
new file mode 100644
index 00000000..628636b0
--- /dev/null
+++ b/conf.d/Makefile.Linux
@@ -0,0 +1 @@
+CONF+= consolefont hwclock keymaps modules
diff --git a/conf.d/Makefile.NetBSD b/conf.d/Makefile.NetBSD
new file mode 100644
index 00000000..1af0433d
--- /dev/null
+++ b/conf.d/Makefile.NetBSD
@@ -0,0 +1 @@
+CONF+= moused powerd rarpd savecore
diff --git a/conf.d/clock b/conf.d/adjkerntz
index 4dab74f7..4dab74f7 100644
--- a/conf.d/clock
+++ b/conf.d/adjkerntz
diff --git a/conf.d.Linux/consolefont b/conf.d/consolefont
index c7fe898a..c7fe898a 100644
--- a/conf.d.Linux/consolefont
+++ b/conf.d/consolefont
diff --git a/conf.d/hwclock b/conf.d/hwclock
new file mode 100644
index 00000000..fe94df03
--- /dev/null
+++ b/conf.d/hwclock
@@ -0,0 +1,14 @@
+# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
+# Greenwich Mean Time). If your clock is set to the local time, then
+# set CLOCK to "local". Note that if you dual boot with Windows, then
+# you should set it to "local".
+clock="UTC"
+
+# If you want to set the Hardware Clock to the current System Time
+# during shutdown, then say "YES" here.
+# You normally don't need to do this if you run a ntp daemon.
+clock_systohc="NO"
+
+# If you wish to pass any other arguments to hwclock during bootup,
+# you may do so here. Alpha users may wish to use --arc or --srm here.
+clock_args=""
diff --git a/conf.d.Linux/keymaps b/conf.d/keymaps
index 842803bb..842803bb 100644
--- a/conf.d.Linux/keymaps
+++ b/conf.d/keymaps
diff --git a/conf.d.Linux/modules b/conf.d/modules
index 2fc26cf3..2fc26cf3 100644
--- a/conf.d.Linux/modules
+++ b/conf.d/modules
diff --git a/conf.d.BSD/moused b/conf.d/moused
index a9d2d401..a9d2d401 100644
--- a/conf.d.BSD/moused
+++ b/conf.d/moused
diff --git a/conf.d.BSD/powerd b/conf.d/powerd
index df5fb700..df5fb700 100644
--- a/conf.d.BSD/powerd
+++ b/conf.d/powerd
diff --git a/conf.d.BSD/rarpd b/conf.d/rarpd
index 60d71a45..60d71a45 100644
--- a/conf.d.BSD/rarpd
+++ b/conf.d/rarpd
diff --git a/conf.d.BSD/localmount b/conf.d/savecore
index 61f2d1b9..99eaefc9 100644
--- a/conf.d.BSD/localmount
+++ b/conf.d/savecore
@@ -1,29 +1,25 @@
-# Kernel core dump options for FreeBSD kernel.
-# Unless you're a FreeBSD kernel developer or driver writer then this won't
+# Unless you're a kernel developer or driver writer then this won't
# be of any interest to you at all.
-
# The following options allow to configure the kernel's core dump
-# facilities. Please read
-# http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html
-# for more information about Kernel core dumps and kernel debugging.
+# facilities.
-# KERNEL_DUMP_DEVICE variable is used to specify which device will be
+# The dump_device variable is used to specify which device will be
# used by the kernel to write the dump down. This has to be a swap
# partition, and has to be at least big enough to contain the whole
# physical memory (see hw.physmem sysctl(8) variable).
# When the variable is commented out, no core dump will be enabled for
# the kernel.
-#KERNEL_DUMP_DEVICE="/dev/ad0s1b"
+#dump_device=/dev/ad0s1b
-# KERNEL_DUMP_DIR variable is used to tell savecore(8) utility where
+# The dump_dir variable is used to tell savecore(8) utility where
# to save the kernel core dump once it's restored from the dump
# device. If unset, /var/crash will be used, as the default of
# FreeBSD.
-#KERNEL_DUMP_DIR="/var/crash"
+#dump_dir=/var/crash
-# KERNEL_DUMP_COMPRESS variable decide whether to compress with
+# The dump_compress variable decide whether to compress with
# gzip(1) the dump or leave it of its original size (the size of the
# physical memory present on the system). If set to yes, the -z option
# will be passed to savecore(8) that will proceed on compressing the
# dump.
-#KERNEL_DUMP_COMPRESS="NO"
+#dump_compress=NO
diff --git a/conf.d.FreeBSD/syscons b/conf.d/syscons
index cd012df6..cd012df6 100644
--- a/conf.d.FreeBSD/syscons
+++ b/conf.d/syscons
diff --git a/etc.BSD/.gitignore b/etc.BSD/.gitignore
deleted file mode 100644
index fe38bc1f..00000000
--- a/etc.BSD/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-rc
-rc.shutdown
diff --git a/etc.BSD/Makefile b/etc.BSD/Makefile
deleted file mode 100644
index 5ce049f4..00000000
--- a/etc.BSD/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-DIR= ${SYSCONFDIR}
-CONF= rc rc.shutdown
-
-MK= ../mk
-include ${MK}/scripts.mk
-include Makefile.${OS}
-
-.SUFFIXES: .in
-.in:
- sed -e 's:@SHELL@:${SHELL}:' -e 's:@TERM@:${DEFTERM}:' $< > $@
diff --git a/etc.BSD/Makefile.FreeBSD b/etc.BSD/Makefile.FreeBSD
deleted file mode 100644
index 6f80f3be..00000000
--- a/etc.BSD/Makefile.FreeBSD
+++ /dev/null
@@ -1 +0,0 @@
-DEFTERM= cons25
diff --git a/etc.BSD/Makefile.NetBSD b/etc.BSD/Makefile.NetBSD
deleted file mode 100644
index 1f9e18b8..00000000
--- a/etc.BSD/Makefile.NetBSD
+++ /dev/null
@@ -1 +0,0 @@
-DEFTERM= wsvt25
diff --git a/etc.FreeBSD/Makefile b/etc.FreeBSD/Makefile
deleted file mode 100644
index b4e8b069..00000000
--- a/etc.FreeBSD/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= /etc
-CONF= devd.conf
-BIN= rc.devd
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/etc.Linux/Makefile b/etc.Linux/Makefile
deleted file mode 100644
index 51f1f42d..00000000
--- a/etc.Linux/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-DIR= ${SYSCONFDIR}
-CONF_APPEND= rc.conf
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/etc/Makefile b/etc/Makefile
index 77262595..8b43544c 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -2,4 +2,6 @@ DIR= ${SYSCONFDIR}
CONF= rc.conf
MK= ../mk
+include ${MK}/os.mk
+include Makefile.${OS}
include ${MK}/scripts.mk
diff --git a/etc/Makefile.FreeBSD b/etc/Makefile.FreeBSD
new file mode 100644
index 00000000..4b6d75f2
--- /dev/null
+++ b/etc/Makefile.FreeBSD
@@ -0,0 +1,4 @@
+SED_EXTRA= -e 's:@TERM@:cons25:g'
+SRCS+= rc.conf.in rc.in rc.shutdown.in
+CONF+= devd.conf
+BIN+= rc.devd
diff --git a/etc/Makefile.Linux b/etc/Makefile.Linux
new file mode 100644
index 00000000..9ac0bc25
--- /dev/null
+++ b/etc/Makefile.Linux
@@ -0,0 +1,6 @@
+SED_EXTRA= -e 's:@TERM@:wsvt25:g'
+SRCS+= rc.in rc.shutdown.in
+
+rc.conf:
+ cp rc.conf.in rc.conf
+ cat rc.conf.Linux >> rc.conf
diff --git a/etc/Makefile.NetBSD b/etc/Makefile.NetBSD
new file mode 100644
index 00000000..5b562947
--- /dev/null
+++ b/etc/Makefile.NetBSD
@@ -0,0 +1,2 @@
+SED_EXTRA= -e 's:@TERM@:wsvt25:g'
+SRCS+= rc.conf.in rc.in rc.shutdown.in
diff --git a/etc.FreeBSD/devd.conf b/etc/devd.conf
index 3cd262cf..3cd262cf 100644
--- a/etc.FreeBSD/devd.conf
+++ b/etc/devd.conf
diff --git a/etc.Linux/rc.conf b/etc/rc.conf.Linux
index d1c216f3..d1c216f3 100644
--- a/etc.Linux/rc.conf
+++ b/etc/rc.conf.Linux
diff --git a/etc/rc.conf b/etc/rc.conf.in
index f0c5b770..f0c5b770 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf.in
diff --git a/etc.FreeBSD/rc.devd b/etc/rc.devd
index f44d9acb..f44d9acb 100644
--- a/etc.FreeBSD/rc.devd
+++ b/etc/rc.devd
diff --git a/etc.BSD/rc.in b/etc/rc.in
index aab7cbb8..aab7cbb8 100644
--- a/etc.BSD/rc.in
+++ b/etc/rc.in
diff --git a/etc.BSD/rc.shutdown.in b/etc/rc.shutdown.in
index e26e8468..e26e8468 100644
--- a/etc.BSD/rc.shutdown.in
+++ b/etc/rc.shutdown.in
diff --git a/init.d.BSD/.gitignore b/init.d.BSD/.gitignore
deleted file mode 100644
index 0d998294..00000000
--- a/init.d.BSD/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-hostid
-moused
-newsyslog
-pf
-rarpd
-rc-enabled
-rpcbind
-savecore
-sysctl
-syslogd
diff --git a/init.d.BSD/Makefile b/init.d.BSD/Makefile
deleted file mode 100644
index 8edff64a..00000000
--- a/init.d.BSD/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-DIR= ${INITDIR}
-SRCS= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
- rpcbind.in savecore.in sysctl.in syslogd.in
-BIN= ${OBJS}
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/init.d.FreeBSD/.gitignore b/init.d.FreeBSD/.gitignore
deleted file mode 100644
index a4207db3..00000000
--- a/init.d.FreeBSD/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-clock
-devd
-dumpon
-ipfw
-mixer
-nscd
-powerd
-syscons
diff --git a/init.d.FreeBSD/Makefile b/init.d.FreeBSD/Makefile
deleted file mode 100644
index 47cbedc7..00000000
--- a/init.d.FreeBSD/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= ${INITDIR}
-SRCS= clock.in devd.in dumpon.in ipfw.in mixer.in nscd.in powerd.in syscons.in
-BIN= ${OBJS}
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/init.d.Linux/.gitignore b/init.d.Linux/.gitignore
deleted file mode 100644
index 44127b44..00000000
--- a/init.d.Linux/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-clock
-consolefont
-keymaps
-modules
-mtab
-numlock
-procfs
-sysctl
diff --git a/init.d.Linux/Makefile b/init.d.Linux/Makefile
deleted file mode 100644
index 8a8ba0dd..00000000
--- a/init.d.Linux/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-DIR= ${INITDIR}
-SRCS= clock.in consolefont.in keymaps.in modules.in mtab.in numlock.in \
- procfs.in sysctl.in
-BIN=${OBJS}
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/init.d.Linux/sysctl.in b/init.d.Linux/sysctl.in
deleted file mode 100644
index ad6b2a92..00000000
--- a/init.d.Linux/sysctl.in
+++ /dev/null
@@ -1,18 +0,0 @@
-#!@PREFIX@/sbin/runscript
-# Copyright 2007-2008 Roy Marples <roy@marples.name>
-# All rights reserved. Released under the 2-clause BSD license.
-
-depend()
-{
- use hostname
- before bootmisc logger
- keyword noopenvz noprefix novserver
-}
-
-start()
-{
- [ -e /etc/sysctl.conf ] || return 0
- ebegin "Configuring kernel parameters"
- sysctl -p /etc/sysctl.conf >/dev/null
- eend $?
-}
diff --git a/init.d.NetBSD/.gitignore b/init.d.NetBSD/.gitignore
deleted file mode 100644
index 70290857..00000000
--- a/init.d.NetBSD/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-swap-blk
-ttys
-wscons
diff --git a/init.d.NetBSD/Makefile b/init.d.NetBSD/Makefile
deleted file mode 100644
index 07ab1cf2..00000000
--- a/init.d.NetBSD/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= ${INITDIR}
-SRCS= swap-blk.in ttys.in wscons.in
-BIN= ${OBJS}
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/init.d/Makefile b/init.d/Makefile
index 38a3f412..a9f62e25 100644
--- a/init.d/Makefile
+++ b/init.d/Makefile
@@ -1,7 +1,9 @@
DIR= ${INITDIR}
SRCS= bootmisc.in fsck.in halt.sh.in hostname.in local.in localmount.in \
- netmount.in root.in swap.in urandom.in
+ netmount.in root.in swap.in sysctl.in urandom.in
BIN= ${OBJS}
MK= ../mk
+include ${MK}/os.mk
+include Makefile.${OS}
include ${MK}/scripts.mk
diff --git a/init.d/Makefile.FreeBSD b/init.d/Makefile.FreeBSD
new file mode 100644
index 00000000..81c7633d
--- /dev/null
+++ b/init.d/Makefile.FreeBSD
@@ -0,0 +1 @@
+SRCS+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in powerd.in syscons.in
diff --git a/init.d/Makefile.Linux b/init.d/Makefile.Linux
new file mode 100644
index 00000000..f8be1de9
--- /dev/null
+++ b/init.d/Makefile.Linux
@@ -0,0 +1,2 @@
+SRCS+= hwclock.in consolefont.in keymaps.in modules.in mtab.in numlock.in \
+ procfs.in
diff --git a/init.d/Makefile.NetBSD b/init.d/Makefile.NetBSD
new file mode 100644
index 00000000..90832db5
--- /dev/null
+++ b/init.d/Makefile.NetBSD
@@ -0,0 +1,6 @@
+# Generic BSD scripts
+SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
+ rpcbind.in savecore.in sysctl.in syslogd.in
+
+# These are NetBSD specific
+SRCS+= swap-blk.in ttys.in wscons.in
diff --git a/init.d.FreeBSD/clock.in b/init.d/adjkerntz.in
index 1c3472a0..cf8c1fa8 100644
--- a/init.d.FreeBSD/clock.in
+++ b/init.d/adjkerntz.in
@@ -16,6 +16,7 @@ fi
depend()
{
+ provide clock
# BSD adjkerntz needs to be able to write to /etc
if [ "${clock}" = "UTC" -a -e /etc/wall_cmos_clock ] ||
[ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then
diff --git a/init.d.Linux/consolefont.in b/init.d/consolefont.in
index a30961e4..a30961e4 100644
--- a/init.d.Linux/consolefont.in
+++ b/init.d/consolefont.in
diff --git a/init.d.FreeBSD/devd.in b/init.d/devd.in
index 039aa961..039aa961 100644
--- a/init.d.FreeBSD/devd.in
+++ b/init.d/devd.in
diff --git a/init.d.FreeBSD/dumpon.in b/init.d/dumpon.in
index f2b65308..f2b65308 100644
--- a/init.d.FreeBSD/dumpon.in
+++ b/init.d/dumpon.in
diff --git a/init.d.BSD/hostid.in b/init.d/hostid.in
index a0588848..a0588848 100644
--- a/init.d.BSD/hostid.in
+++ b/init.d/hostid.in
diff --git a/init.d.Linux/clock.in b/init.d/hwclock.in
index 0bb71980..9b1a87d5 100644
--- a/init.d.Linux/clock.in
+++ b/init.d/hwclock.in
@@ -23,6 +23,7 @@ fi
depend()
{
+ provide clock
if yesno ${clock_adjfile}; then
use root
else
diff --git a/init.d.FreeBSD/ipfw.in b/init.d/ipfw.in
index f8d9c3e1..f8d9c3e1 100644
--- a/init.d.FreeBSD/ipfw.in
+++ b/init.d/ipfw.in
diff --git a/init.d.Linux/keymaps.in b/init.d/keymaps.in
index 2079e049..2079e049 100644
--- a/init.d.Linux/keymaps.in
+++ b/init.d/keymaps.in
diff --git a/init.d.FreeBSD/mixer.in b/init.d/mixer.in
index f496bd18..f496bd18 100644
--- a/init.d.FreeBSD/mixer.in
+++ b/init.d/mixer.in
diff --git a/init.d.Linux/modules.in b/init.d/modules.in
index 1a0c7458..1a0c7458 100644
--- a/init.d.Linux/modules.in
+++ b/init.d/modules.in
diff --git a/init.d.BSD/moused.in b/init.d/moused.in
index a0e97cdf..a0e97cdf 100644
--- a/init.d.BSD/moused.in
+++ b/init.d/moused.in
diff --git a/init.d.Linux/mtab.in b/init.d/mtab.in
index a0f14b1e..a0f14b1e 100644
--- a/init.d.Linux/mtab.in
+++ b/init.d/mtab.in
diff --git a/init.d.BSD/newsyslog.in b/init.d/newsyslog.in
index 04ca7928..04ca7928 100644
--- a/init.d.BSD/newsyslog.in
+++ b/init.d/newsyslog.in
diff --git a/init.d.FreeBSD/nscd.in b/init.d/nscd.in
index e70ba4a3..e70ba4a3 100644
--- a/init.d.FreeBSD/nscd.in
+++ b/init.d/nscd.in
diff --git a/init.d.Linux/numlock.in b/init.d/numlock.in
index 1a71367e..1a71367e 100644
--- a/init.d.Linux/numlock.in
+++ b/init.d/numlock.in
diff --git a/init.d.BSD/pf.in b/init.d/pf.in
index fa55ea48..fa55ea48 100644
--- a/init.d.BSD/pf.in
+++ b/init.d/pf.in
diff --git a/init.d.FreeBSD/powerd.in b/init.d/powerd.in
index 1c2d8456..1c2d8456 100644
--- a/init.d.FreeBSD/powerd.in
+++ b/init.d/powerd.in
diff --git a/init.d.Linux/procfs.in b/init.d/procfs.in
index a30fd92c..a30fd92c 100644
--- a/init.d.Linux/procfs.in
+++ b/init.d/procfs.in
diff --git a/init.d.BSD/rarpd.in b/init.d/rarpd.in
index e7510990..e7510990 100644
--- a/init.d.BSD/rarpd.in
+++ b/init.d/rarpd.in
diff --git a/init.d.BSD/rc-enabled.in b/init.d/rc-enabled.in
index 9801203b..9801203b 100644
--- a/init.d.BSD/rc-enabled.in
+++ b/init.d/rc-enabled.in
diff --git a/init.d.BSD/rpcbind.in b/init.d/rpcbind.in
index 2d053ebd..2d053ebd 100644
--- a/init.d.BSD/rpcbind.in
+++ b/init.d/rpcbind.in
diff --git a/init.d.BSD/savecore.in b/init.d/savecore.in
index e23bde48..e23bde48 100644
--- a/init.d.BSD/savecore.in
+++ b/init.d/savecore.in
diff --git a/init.d.NetBSD/swap-blk.in b/init.d/swap-blk.in
index 4708bfff..4708bfff 100644
--- a/init.d.NetBSD/swap-blk.in
+++ b/init.d/swap-blk.in
diff --git a/init.d.FreeBSD/syscons.in b/init.d/syscons.in
index 94c91a06..94c91a06 100644
--- a/init.d.FreeBSD/syscons.in
+++ b/init.d/syscons.in
diff --git a/init.d.BSD/sysctl.in b/init.d/sysctl.in
index b1d8fb83..b1d8fb83 100644
--- a/init.d.BSD/sysctl.in
+++ b/init.d/sysctl.in
diff --git a/init.d.BSD/syslogd.in b/init.d/syslogd.in
index b39a7d3c..b39a7d3c 100644
--- a/init.d.BSD/syslogd.in
+++ b/init.d/syslogd.in
diff --git a/init.d.NetBSD/ttys.in b/init.d/ttys.in
index 8381d042..8381d042 100644
--- a/init.d.NetBSD/ttys.in
+++ b/init.d/ttys.in
diff --git a/init.d.NetBSD/wscons.in b/init.d/wscons.in
index 15e5b56b..15e5b56b 100644
--- a/init.d.NetBSD/wscons.in
+++ b/init.d/wscons.in
diff --git a/mk/scripts.mk b/mk/scripts.mk
index 146b56a5..1bb5662b 100644
--- a/mk/scripts.mk
+++ b/mk/scripts.mk
@@ -16,29 +16,32 @@ SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR
# Tweak our shell scripts
.SUFFIXES: .sh.in .in
.sh.in.sh:
- sed ${SED_REPLACE} $< > $@
+ sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
.in:
- sed ${SED_REPLACE} $< > $@
+ sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
all: ${OBJS}
realinstall: ${BIN} ${CONF} ${CONF_APPEND}
- if test -n "${DIR}"; then ${INSTALL} -d ${DESTDIR}/${PREFIX}${DIR} || exit $$?; fi
- if test -n "${BIN}"; then ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; fi
- if test -n "${INC}"; then ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; fi
- for x in ${CONF}; do \
- if ! test -e ${DESTDIR}/${PREFIX}${DIR}/$$x; then \
+ @if test -n "${DIR}"; then \
+ ${ECHO} ${INSTALL} -d ${DESTDIR}/${PREFIX}${DIR}; \
+ ${INSTALL} -d ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \
+ fi
+ @if test -n "${BIN}"; then \
+ ${ECHO} ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${PREFIX}${DIR}; \
+ ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \
+ fi
+ @if test -n "${INC}"; then \
+ ${ECHO} ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${PREFIX}${DIR}; \
+ ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \
+ fi
+ @for x in ${CONF}; do \
+ if ! test -e ${DESTDIR}/${PREFIX}${DIR}/$$x; then \
+ ${ECHO} ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR}; \
${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \
fi; \
done
- for x in ${CONF_APPEND}; do \
- if test -e ${DESTDIR}/${PREFIX}${DIR}/$$x; then \
- cat $$x >> ${DESTDIR}/${PREFIX}${DIR}/$$x || exit $$?; \
- else \
- ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \
- fi; \
- done
install: all realinstall ${INSTALLAFTER}
diff --git a/net.NetBSD/Makefile b/net.NetBSD/Makefile
deleted file mode 100644
index ebdb26f2..00000000
--- a/net.NetBSD/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-DIR= ${RC_LIB}/net
-INC= ifwatchd.sh
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/net/Makefile b/net/Makefile
index 944c3fc3..e2eb4d36 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -3,4 +3,6 @@ INC= dhclient.sh dhcpcd.sh macchanger.sh macnet.sh \
ssidnet.sh system.sh wpa_supplicant.sh
MK= ../mk
+include ${MK}/os.mk
+include Makefile.${OS}
include ${MK}/scripts.mk
diff --git a/net/Makefile.FreeBSD b/net/Makefile.FreeBSD
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/net/Makefile.FreeBSD
diff --git a/net/Makefile.Linux b/net/Makefile.Linux
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/net/Makefile.Linux
diff --git a/net/Makefile.NetBSD b/net/Makefile.NetBSD
new file mode 100644
index 00000000..cda89ef9
--- /dev/null
+++ b/net/Makefile.NetBSD
@@ -0,0 +1 @@
+INC+= ifwatchd.sh
diff --git a/net.NetBSD/ifwatchd.sh b/net/ifwatchd.sh
index 44c6ea31..44c6ea31 100644
--- a/net.NetBSD/ifwatchd.sh
+++ b/net/ifwatchd.sh
diff --git a/runlevels/Makefile b/runlevels/Makefile
index 38d93060..9b2a7491 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -11,7 +11,6 @@ include ${MK}/sys.mk
include ${MK}/os.mk
include ${MK}/gitignore.mk
include Makefile.${OS}
-include Makefile.${SUBOS}
all:
diff --git a/runlevels/Makefile.FreeBSD b/runlevels/Makefile.FreeBSD
index fa8622bc..614e965b 100644
--- a/runlevels/Makefile.FreeBSD
+++ b/runlevels/Makefile.FreeBSD
@@ -1 +1,5 @@
-BOOT+= clock dumpon syscons
+# Generic BSD stuff
+BOOT+= hostid net.lo0 newsyslog savecore syslogd
+
+# FreeBSD specific stuff
+BOOT+= adjkerntz dumpon syscons
diff --git a/runlevels/Makefile.Linux b/runlevels/Makefile.Linux
index 81101e34..1aa23f96 100644
--- a/runlevels/Makefile.Linux
+++ b/runlevels/Makefile.Linux
@@ -1,2 +1,2 @@
-BOOT+= clock consolefont keymaps modules mtab net.lo procfs
+BOOT+= hwclock consolefont keymaps modules mtab net.lo procfs
DEFAULT+= hdparm
diff --git a/runlevels/Makefile.NetBSD b/runlevels/Makefile.NetBSD
index ad61d8fb..e6c2e646 100644
--- a/runlevels/Makefile.NetBSD
+++ b/runlevels/Makefile.NetBSD
@@ -1 +1,5 @@
-BOOT+= ttys wscons
+# Generic BSD stuff
+BOOT+= hostid net.lo0 newsyslog savecore syslogd
+
+# NetBSD specific stuff
+BOOT+= ttys wscons
diff --git a/sh.BSD/.gitignore b/sh.BSD/.gitignore
deleted file mode 100644
index 3dfb118f..00000000
--- a/sh.BSD/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-init.sh
diff --git a/sh.BSD/Makefile b/sh.BSD/Makefile
deleted file mode 100644
index f4544368..00000000
--- a/sh.BSD/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= ${RC_LIB}/sh
-SRCS= init.sh.in
-BIN= ${OBJS}
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/sh.Linux/.gitignore b/sh.Linux/.gitignore
deleted file mode 100644
index 35d6396d..00000000
--- a/sh.Linux/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-init-early.sh
-init.sh
diff --git a/sh.Linux/Makefile b/sh.Linux/Makefile
deleted file mode 100644
index 829cb7ca..00000000
--- a/sh.Linux/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= ${RC_LIB}/sh
-SRCS= init-early.sh.in init.sh.in
-BIN= ${OBJS}
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/sh.NetBSD/.gitignore b/sh.NetBSD/.gitignore
deleted file mode 100644
index cb05fa78..00000000
--- a/sh.NetBSD/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ifwatchd-carrier.sh
-ifwatchd-nocarrier.sh
diff --git a/sh.NetBSD/Makefile b/sh.NetBSD/Makefile
deleted file mode 100644
index c93922bd..00000000
--- a/sh.NetBSD/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= ${RC_LIB}/sh
-SRCS= ifwatchd-carrier.sh.in ifwatchd-nocarrier.sh.in
-BIN= ifwatchd-carrier.sh ifwatchd-nocarrier.sh
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/sh/Makefile b/sh/Makefile
index 2f10ef53..43b796bd 100644
--- a/sh/Makefile
+++ b/sh/Makefile
@@ -2,14 +2,14 @@ DIR= ${RC_LIB}/sh
SRCS= functions.sh.in gendepends.sh.in net.sh.in \
rc-functions.sh.in runscript.sh.in
INC= init-common-post.sh rc-mount.sh functions.sh rc-functions.sh
-BIN= gendepends.sh net.sh runscript.sh
+BIN= gendepends.sh init.sh net.sh runscript.sh
INSTALLAFTER= _installafter
MK= ../mk
-# To get NET_LO
+include ${MK}/os.mk
+include Makefile.${OS}
include ${MK}/scripts.mk
-include Makefile.${SUBOS}
_installafter:
${INSTALL} -d ${DESTDIR}/${PREFIX}/${INITDIR}
diff --git a/sh/Makefile.BSD b/sh/Makefile.BSD
deleted file mode 100644
index f1e45618..00000000
--- a/sh/Makefile.BSD
+++ /dev/null
@@ -1 +0,0 @@
-NET_LO = net.lo0
diff --git a/sh/Makefile.FreeBSD b/sh/Makefile.FreeBSD
new file mode 100644
index 00000000..210ee0c3
--- /dev/null
+++ b/sh/Makefile.FreeBSD
@@ -0,0 +1,8 @@
+SRCS+= init.sh.in
+
+NET_LO= net.lo0
+
+.SUFFIXES: .BSD.sh.in
+.BSD.sh.in.sh:
+ sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
+
diff --git a/sh/Makefile.Linux b/sh/Makefile.Linux
index 219c92fb..6546d92b 100644
--- a/sh/Makefile.Linux
+++ b/sh/Makefile.Linux
@@ -1 +1,8 @@
-NET_LO = net.lo
+NET_LO= net.lo
+SRCS+= init.sh.in init-early.sh.in
+BIN+= init-early.sh
+
+.SUFFIXES: .Linux.sh.in
+.Linux.sh.in.sh:
+ sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
+
diff --git a/sh/Makefile.NetBSD b/sh/Makefile.NetBSD
new file mode 100644
index 00000000..5b13c88a
--- /dev/null
+++ b/sh/Makefile.NetBSD
@@ -0,0 +1,10 @@
+SRCS+= init.sh.in
+
+NET_LO= net.lo0
+SRCS+= ifwatchd-carrier.sh.in ifwatchd-nocarrier.sh.in
+BIN+= ifwatchd-carrier.sh ifwatchd-nocarrier.sh
+
+.SUFFIXES: .BSD.sh.in
+.BSD.sh.in.sh:
+ sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
+
diff --git a/sh.NetBSD/ifwatchd-carrier.sh.in b/sh/ifwatchd-carrier.sh.in
index ec9c5abd..ec9c5abd 100644
--- a/sh.NetBSD/ifwatchd-carrier.sh.in
+++ b/sh/ifwatchd-carrier.sh.in
diff --git a/sh.NetBSD/ifwatchd-nocarrier.sh.in b/sh/ifwatchd-nocarrier.sh.in
index 3ba111cb..3ba111cb 100644
--- a/sh.NetBSD/ifwatchd-nocarrier.sh.in
+++ b/sh/ifwatchd-nocarrier.sh.in
diff --git a/sh.Linux/init-early.sh.in b/sh/init-early.Linux.sh.in
index d6cb007d..d6cb007d 100644
--- a/sh.Linux/init-early.sh.in
+++ b/sh/init-early.Linux.sh.in
diff --git a/sh.BSD/init.sh.in b/sh/init.BSD.sh.in
index dbff7368..dbff7368 100644
--- a/sh.BSD/init.sh.in
+++ b/sh/init.BSD.sh.in
diff --git a/sh.Linux/init.sh.in b/sh/init.Linux.sh.in
index 25a3ecb7..25a3ecb7 100644
--- a/sh.Linux/init.sh.in
+++ b/sh/init.Linux.sh.in