From 55eb3794fb4ad563102d5ab30c1d5337a599b2e5 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 25 Mar 2008 14:06:05 +0000 Subject: [PATCH] Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS. --- conf.d.BSD/Makefile | 5 --- conf.d.FreeBSD/Makefile | 5 --- conf.d.Linux/Makefile | 6 ---- conf.d.Linux/clock | 9 ------ conf.d/Makefile | 2 +- conf.d/Makefile.FreeBSD | 1 + conf.d/Makefile.Linux | 1 + conf.d/Makefile.NetBSD | 1 + conf.d/{clock => adjkerntz} | 0 {conf.d.Linux => conf.d}/consolefont | 0 conf.d/hwclock | 14 +++++++++ {conf.d.Linux => conf.d}/keymaps | 0 {conf.d.Linux => conf.d}/modules | 0 {conf.d.BSD => conf.d}/moused | 0 {conf.d.BSD => conf.d}/powerd | 0 {conf.d.BSD => conf.d}/rarpd | 0 conf.d.BSD/localmount => conf.d/savecore | 20 +++++------- {conf.d.FreeBSD => conf.d}/syscons | 0 etc.BSD/.gitignore | 2 -- etc.BSD/Makefile | 10 ------ etc.BSD/Makefile.FreeBSD | 1 - etc.BSD/Makefile.NetBSD | 1 - etc.FreeBSD/Makefile | 6 ---- etc.Linux/Makefile | 5 --- etc/Makefile | 2 ++ etc/Makefile.FreeBSD | 4 +++ etc/Makefile.Linux | 6 ++++ etc/Makefile.NetBSD | 2 ++ {etc.FreeBSD => etc}/devd.conf | 0 etc.Linux/rc.conf => etc/rc.conf.Linux | 0 etc/{rc.conf => rc.conf.in} | 0 {etc.FreeBSD => etc}/rc.devd | 0 {etc.BSD => etc}/rc.in | 0 {etc.BSD => etc}/rc.shutdown.in | 0 init.d.BSD/.gitignore | 10 ------ init.d.BSD/Makefile | 7 ----- init.d.FreeBSD/.gitignore | 8 ----- init.d.FreeBSD/Makefile | 6 ---- init.d.Linux/.gitignore | 8 ----- init.d.Linux/Makefile | 7 ----- init.d.Linux/sysctl.in | 18 ----------- init.d.NetBSD/.gitignore | 3 -- init.d.NetBSD/Makefile | 6 ---- init.d/Makefile | 4 ++- init.d/Makefile.FreeBSD | 1 + init.d/Makefile.Linux | 2 ++ init.d/Makefile.NetBSD | 6 ++++ .../clock.in => init.d/adjkerntz.in | 1 + {init.d.Linux => init.d}/consolefont.in | 0 {init.d.FreeBSD => init.d}/devd.in | 0 {init.d.FreeBSD => init.d}/dumpon.in | 0 {init.d.BSD => init.d}/hostid.in | 0 init.d.Linux/clock.in => init.d/hwclock.in | 1 + {init.d.FreeBSD => init.d}/ipfw.in | 0 {init.d.Linux => init.d}/keymaps.in | 0 {init.d.FreeBSD => init.d}/mixer.in | 0 {init.d.Linux => init.d}/modules.in | 0 {init.d.BSD => init.d}/moused.in | 0 {init.d.Linux => init.d}/mtab.in | 0 {init.d.BSD => init.d}/newsyslog.in | 0 {init.d.FreeBSD => init.d}/nscd.in | 0 {init.d.Linux => init.d}/numlock.in | 0 {init.d.BSD => init.d}/pf.in | 0 {init.d.FreeBSD => init.d}/powerd.in | 0 {init.d.Linux => init.d}/procfs.in | 0 {init.d.BSD => init.d}/rarpd.in | 0 {init.d.BSD => init.d}/rc-enabled.in | 0 {init.d.BSD => init.d}/rpcbind.in | 0 {init.d.BSD => init.d}/savecore.in | 0 {init.d.NetBSD => init.d}/swap-blk.in | 0 {init.d.FreeBSD => init.d}/syscons.in | 0 {init.d.BSD => init.d}/sysctl.in | 0 {init.d.BSD => init.d}/syslogd.in | 0 {init.d.NetBSD => init.d}/ttys.in | 0 {init.d.NetBSD => init.d}/wscons.in | 0 mk/scripts.mk | 31 ++++++++++--------- net.NetBSD/Makefile | 5 --- net/Makefile | 2 ++ net/Makefile.FreeBSD | 0 net/Makefile.Linux | 0 net/Makefile.NetBSD | 1 + {net.NetBSD => net}/ifwatchd.sh | 0 runlevels/Makefile | 1 - runlevels/Makefile.FreeBSD | 6 +++- runlevels/Makefile.Linux | 2 +- runlevels/Makefile.NetBSD | 6 +++- sh.BSD/.gitignore | 1 - sh.BSD/Makefile | 6 ---- sh.Linux/.gitignore | 2 -- sh.Linux/Makefile | 6 ---- sh.NetBSD/.gitignore | 2 -- sh.NetBSD/Makefile | 6 ---- sh/Makefile | 6 ++-- sh/Makefile.BSD | 1 - sh/Makefile.FreeBSD | 8 +++++ sh/Makefile.Linux | 9 +++++- sh/Makefile.NetBSD | 10 ++++++ {sh.NetBSD => sh}/ifwatchd-carrier.sh.in | 0 {sh.NetBSD => sh}/ifwatchd-nocarrier.sh.in | 0 .../init-early.Linux.sh.in | 0 sh.BSD/init.sh.in => sh/init.BSD.sh.in | 0 sh.Linux/init.sh.in => sh/init.Linux.sh.in | 0 102 files changed, 114 insertions(+), 188 deletions(-) delete mode 100644 conf.d.BSD/Makefile delete mode 100644 conf.d.FreeBSD/Makefile delete mode 100644 conf.d.Linux/Makefile delete mode 100644 conf.d.Linux/clock create mode 100644 conf.d/Makefile.FreeBSD create mode 100644 conf.d/Makefile.Linux create mode 100644 conf.d/Makefile.NetBSD rename conf.d/{clock => adjkerntz} (100%) rename {conf.d.Linux => conf.d}/consolefont (100%) create mode 100644 conf.d/hwclock rename {conf.d.Linux => conf.d}/keymaps (100%) rename {conf.d.Linux => conf.d}/modules (100%) rename {conf.d.BSD => conf.d}/moused (100%) rename {conf.d.BSD => conf.d}/powerd (100%) rename {conf.d.BSD => conf.d}/rarpd (100%) rename conf.d.BSD/localmount => conf.d/savecore (55%) rename {conf.d.FreeBSD => conf.d}/syscons (100%) delete mode 100644 etc.BSD/.gitignore delete mode 100644 etc.BSD/Makefile delete mode 100644 etc.BSD/Makefile.FreeBSD delete mode 100644 etc.BSD/Makefile.NetBSD delete mode 100644 etc.FreeBSD/Makefile delete mode 100644 etc.Linux/Makefile create mode 100644 etc/Makefile.FreeBSD create mode 100644 etc/Makefile.Linux create mode 100644 etc/Makefile.NetBSD rename {etc.FreeBSD => etc}/devd.conf (100%) rename etc.Linux/rc.conf => etc/rc.conf.Linux (100%) rename etc/{rc.conf => rc.conf.in} (100%) rename {etc.FreeBSD => etc}/rc.devd (100%) rename {etc.BSD => etc}/rc.in (100%) rename {etc.BSD => etc}/rc.shutdown.in (100%) delete mode 100644 init.d.BSD/.gitignore delete mode 100644 init.d.BSD/Makefile delete mode 100644 init.d.FreeBSD/.gitignore delete mode 100644 init.d.FreeBSD/Makefile delete mode 100644 init.d.Linux/.gitignore delete mode 100644 init.d.Linux/Makefile delete mode 100644 init.d.Linux/sysctl.in delete mode 100644 init.d.NetBSD/.gitignore delete mode 100644 init.d.NetBSD/Makefile create mode 100644 init.d/Makefile.FreeBSD create mode 100644 init.d/Makefile.Linux create mode 100644 init.d/Makefile.NetBSD rename init.d.FreeBSD/clock.in => init.d/adjkerntz.in (98%) rename {init.d.Linux => init.d}/consolefont.in (100%) rename {init.d.FreeBSD => init.d}/devd.in (100%) rename {init.d.FreeBSD => init.d}/dumpon.in (100%) rename {init.d.BSD => init.d}/hostid.in (100%) rename init.d.Linux/clock.in => init.d/hwclock.in (99%) rename {init.d.FreeBSD => init.d}/ipfw.in (100%) rename {init.d.Linux => init.d}/keymaps.in (100%) rename {init.d.FreeBSD => init.d}/mixer.in (100%) rename {init.d.Linux => init.d}/modules.in (100%) rename {init.d.BSD => init.d}/moused.in (100%) rename {init.d.Linux => init.d}/mtab.in (100%) rename {init.d.BSD => init.d}/newsyslog.in (100%) rename {init.d.FreeBSD => init.d}/nscd.in (100%) rename {init.d.Linux => init.d}/numlock.in (100%) rename {init.d.BSD => init.d}/pf.in (100%) rename {init.d.FreeBSD => init.d}/powerd.in (100%) rename {init.d.Linux => init.d}/procfs.in (100%) rename {init.d.BSD => init.d}/rarpd.in (100%) rename {init.d.BSD => init.d}/rc-enabled.in (100%) rename {init.d.BSD => init.d}/rpcbind.in (100%) rename {init.d.BSD => init.d}/savecore.in (100%) rename {init.d.NetBSD => init.d}/swap-blk.in (100%) rename {init.d.FreeBSD => init.d}/syscons.in (100%) rename {init.d.BSD => init.d}/sysctl.in (100%) rename {init.d.BSD => init.d}/syslogd.in (100%) rename {init.d.NetBSD => init.d}/ttys.in (100%) rename {init.d.NetBSD => init.d}/wscons.in (100%) delete mode 100644 net.NetBSD/Makefile create mode 100644 net/Makefile.FreeBSD create mode 100644 net/Makefile.Linux create mode 100644 net/Makefile.NetBSD rename {net.NetBSD => net}/ifwatchd.sh (100%) delete mode 100644 sh.BSD/.gitignore delete mode 100644 sh.BSD/Makefile delete mode 100644 sh.Linux/.gitignore delete mode 100644 sh.Linux/Makefile delete mode 100644 sh.NetBSD/.gitignore delete mode 100644 sh.NetBSD/Makefile delete mode 100644 sh/Makefile.BSD create mode 100644 sh/Makefile.FreeBSD create mode 100644 sh/Makefile.NetBSD rename {sh.NetBSD => sh}/ifwatchd-carrier.sh.in (100%) rename {sh.NetBSD => sh}/ifwatchd-nocarrier.sh.in (100%) rename sh.Linux/init-early.sh.in => sh/init-early.Linux.sh.in (100%) rename sh.BSD/init.sh.in => sh/init.BSD.sh.in (100%) rename sh.Linux/init.sh.in => sh/init.Linux.sh.in (100%) 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 similarity index 100% rename from conf.d/clock rename to conf.d/adjkerntz diff --git a/conf.d.Linux/consolefont b/conf.d/consolefont similarity index 100% rename from conf.d.Linux/consolefont rename to 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 similarity index 100% rename from conf.d.Linux/keymaps rename to conf.d/keymaps diff --git a/conf.d.Linux/modules b/conf.d/modules similarity index 100% rename from conf.d.Linux/modules rename to conf.d/modules diff --git a/conf.d.BSD/moused b/conf.d/moused similarity index 100% rename from conf.d.BSD/moused rename to conf.d/moused diff --git a/conf.d.BSD/powerd b/conf.d/powerd similarity index 100% rename from conf.d.BSD/powerd rename to conf.d/powerd diff --git a/conf.d.BSD/rarpd b/conf.d/rarpd similarity index 100% rename from conf.d.BSD/rarpd rename to conf.d/rarpd diff --git a/conf.d.BSD/localmount b/conf.d/savecore similarity index 55% rename from conf.d.BSD/localmount rename to 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 similarity index 100% rename from conf.d.FreeBSD/syscons rename to 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 similarity index 100% rename from etc.FreeBSD/devd.conf rename to etc/devd.conf diff --git a/etc.Linux/rc.conf b/etc/rc.conf.Linux similarity index 100% rename from etc.Linux/rc.conf rename to etc/rc.conf.Linux diff --git a/etc/rc.conf b/etc/rc.conf.in similarity index 100% rename from etc/rc.conf rename to etc/rc.conf.in diff --git a/etc.FreeBSD/rc.devd b/etc/rc.devd similarity index 100% rename from etc.FreeBSD/rc.devd rename to etc/rc.devd diff --git a/etc.BSD/rc.in b/etc/rc.in similarity index 100% rename from etc.BSD/rc.in rename to etc/rc.in diff --git a/etc.BSD/rc.shutdown.in b/etc/rc.shutdown.in similarity index 100% rename from etc.BSD/rc.shutdown.in rename to 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 -# 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 similarity index 98% rename from init.d.FreeBSD/clock.in rename to 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 similarity index 100% rename from init.d.Linux/consolefont.in rename to init.d/consolefont.in diff --git a/init.d.FreeBSD/devd.in b/init.d/devd.in similarity index 100% rename from init.d.FreeBSD/devd.in rename to init.d/devd.in diff --git a/init.d.FreeBSD/dumpon.in b/init.d/dumpon.in similarity index 100% rename from init.d.FreeBSD/dumpon.in rename to init.d/dumpon.in diff --git a/init.d.BSD/hostid.in b/init.d/hostid.in similarity index 100% rename from init.d.BSD/hostid.in rename to init.d/hostid.in diff --git a/init.d.Linux/clock.in b/init.d/hwclock.in similarity index 99% rename from init.d.Linux/clock.in rename to 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 similarity index 100% rename from init.d.FreeBSD/ipfw.in rename to init.d/ipfw.in diff --git a/init.d.Linux/keymaps.in b/init.d/keymaps.in similarity index 100% rename from init.d.Linux/keymaps.in rename to init.d/keymaps.in diff --git a/init.d.FreeBSD/mixer.in b/init.d/mixer.in similarity index 100% rename from init.d.FreeBSD/mixer.in rename to init.d/mixer.in diff --git a/init.d.Linux/modules.in b/init.d/modules.in similarity index 100% rename from init.d.Linux/modules.in rename to init.d/modules.in diff --git a/init.d.BSD/moused.in b/init.d/moused.in similarity index 100% rename from init.d.BSD/moused.in rename to init.d/moused.in diff --git a/init.d.Linux/mtab.in b/init.d/mtab.in similarity index 100% rename from init.d.Linux/mtab.in rename to init.d/mtab.in diff --git a/init.d.BSD/newsyslog.in b/init.d/newsyslog.in similarity index 100% rename from init.d.BSD/newsyslog.in rename to init.d/newsyslog.in diff --git a/init.d.FreeBSD/nscd.in b/init.d/nscd.in similarity index 100% rename from init.d.FreeBSD/nscd.in rename to init.d/nscd.in diff --git a/init.d.Linux/numlock.in b/init.d/numlock.in similarity index 100% rename from init.d.Linux/numlock.in rename to init.d/numlock.in diff --git a/init.d.BSD/pf.in b/init.d/pf.in similarity index 100% rename from init.d.BSD/pf.in rename to init.d/pf.in diff --git a/init.d.FreeBSD/powerd.in b/init.d/powerd.in similarity index 100% rename from init.d.FreeBSD/powerd.in rename to init.d/powerd.in diff --git a/init.d.Linux/procfs.in b/init.d/procfs.in similarity index 100% rename from init.d.Linux/procfs.in rename to init.d/procfs.in diff --git a/init.d.BSD/rarpd.in b/init.d/rarpd.in similarity index 100% rename from init.d.BSD/rarpd.in rename to init.d/rarpd.in diff --git a/init.d.BSD/rc-enabled.in b/init.d/rc-enabled.in similarity index 100% rename from init.d.BSD/rc-enabled.in rename to init.d/rc-enabled.in diff --git a/init.d.BSD/rpcbind.in b/init.d/rpcbind.in similarity index 100% rename from init.d.BSD/rpcbind.in rename to init.d/rpcbind.in diff --git a/init.d.BSD/savecore.in b/init.d/savecore.in similarity index 100% rename from init.d.BSD/savecore.in rename to init.d/savecore.in diff --git a/init.d.NetBSD/swap-blk.in b/init.d/swap-blk.in similarity index 100% rename from init.d.NetBSD/swap-blk.in rename to init.d/swap-blk.in diff --git a/init.d.FreeBSD/syscons.in b/init.d/syscons.in similarity index 100% rename from init.d.FreeBSD/syscons.in rename to init.d/syscons.in diff --git a/init.d.BSD/sysctl.in b/init.d/sysctl.in similarity index 100% rename from init.d.BSD/sysctl.in rename to init.d/sysctl.in diff --git a/init.d.BSD/syslogd.in b/init.d/syslogd.in similarity index 100% rename from init.d.BSD/syslogd.in rename to init.d/syslogd.in diff --git a/init.d.NetBSD/ttys.in b/init.d/ttys.in similarity index 100% rename from init.d.NetBSD/ttys.in rename to init.d/ttys.in diff --git a/init.d.NetBSD/wscons.in b/init.d/wscons.in similarity index 100% rename from init.d.NetBSD/wscons.in rename to 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 diff --git a/net/Makefile.Linux b/net/Makefile.Linux new file mode 100644 index 00000000..e69de29b 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 similarity index 100% rename from net.NetBSD/ifwatchd.sh rename to 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 similarity index 100% rename from sh.NetBSD/ifwatchd-carrier.sh.in rename to sh/ifwatchd-carrier.sh.in diff --git a/sh.NetBSD/ifwatchd-nocarrier.sh.in b/sh/ifwatchd-nocarrier.sh.in similarity index 100% rename from sh.NetBSD/ifwatchd-nocarrier.sh.in rename to sh/ifwatchd-nocarrier.sh.in diff --git a/sh.Linux/init-early.sh.in b/sh/init-early.Linux.sh.in similarity index 100% rename from sh.Linux/init-early.sh.in rename to sh/init-early.Linux.sh.in diff --git a/sh.BSD/init.sh.in b/sh/init.BSD.sh.in similarity index 100% rename from sh.BSD/init.sh.in rename to sh/init.BSD.sh.in diff --git a/sh.Linux/init.sh.in b/sh/init.Linux.sh.in similarity index 100% rename from sh.Linux/init.sh.in rename to sh/init.Linux.sh.in