Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS.
This commit is contained in:
parent
08aff6ef44
commit
55eb3794fb
@ -1,5 +0,0 @@
|
||||
DIR= ${CONFDIR}
|
||||
CONF= localmount moused powerd rarpd
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
@ -1,5 +0,0 @@
|
||||
DIR= ${CONFDIR}
|
||||
CONF= syscons
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
@ -1,6 +0,0 @@
|
||||
DIR= ${CONFDIR}
|
||||
CONF= consolefont keymaps modules
|
||||
CONF_APPEND= clock
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
@ -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=""
|
@ -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
|
||||
|
1
conf.d/Makefile.FreeBSD
Normal file
1
conf.d/Makefile.FreeBSD
Normal file
@ -0,0 +1 @@
|
||||
CONF+= moused powerd rarpd savecore syscons
|
1
conf.d/Makefile.Linux
Normal file
1
conf.d/Makefile.Linux
Normal file
@ -0,0 +1 @@
|
||||
CONF+= consolefont hwclock keymaps modules
|
1
conf.d/Makefile.NetBSD
Normal file
1
conf.d/Makefile.NetBSD
Normal file
@ -0,0 +1 @@
|
||||
CONF+= moused powerd rarpd savecore
|
14
conf.d/hwclock
Normal file
14
conf.d/hwclock
Normal file
@ -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=""
|
@ -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
|
2
etc.BSD/.gitignore
vendored
2
etc.BSD/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
rc
|
||||
rc.shutdown
|
@ -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}:' $< > $@
|
@ -1 +0,0 @@
|
||||
DEFTERM= cons25
|
@ -1 +0,0 @@
|
||||
DEFTERM= wsvt25
|
@ -1,6 +0,0 @@
|
||||
DIR= /etc
|
||||
CONF= devd.conf
|
||||
BIN= rc.devd
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
@ -1,5 +0,0 @@
|
||||
DIR= ${SYSCONFDIR}
|
||||
CONF_APPEND= rc.conf
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
@ -2,4 +2,6 @@ DIR= ${SYSCONFDIR}
|
||||
CONF= rc.conf
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/os.mk
|
||||
include Makefile.${OS}
|
||||
include ${MK}/scripts.mk
|
||||
|
4
etc/Makefile.FreeBSD
Normal file
4
etc/Makefile.FreeBSD
Normal file
@ -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
|
6
etc/Makefile.Linux
Normal file
6
etc/Makefile.Linux
Normal file
@ -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
|
2
etc/Makefile.NetBSD
Normal file
2
etc/Makefile.NetBSD
Normal file
@ -0,0 +1,2 @@
|
||||
SED_EXTRA= -e 's:@TERM@:wsvt25:g'
|
||||
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
10
init.d.BSD/.gitignore
vendored
10
init.d.BSD/.gitignore
vendored
@ -1,10 +0,0 @@
|
||||
hostid
|
||||
moused
|
||||
newsyslog
|
||||
pf
|
||||
rarpd
|
||||
rc-enabled
|
||||
rpcbind
|
||||
savecore
|
||||
sysctl
|
||||
syslogd
|
@ -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
|
8
init.d.FreeBSD/.gitignore
vendored
8
init.d.FreeBSD/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
clock
|
||||
devd
|
||||
dumpon
|
||||
ipfw
|
||||
mixer
|
||||
nscd
|
||||
powerd
|
||||
syscons
|
@ -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
|
8
init.d.Linux/.gitignore
vendored
8
init.d.Linux/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
clock
|
||||
consolefont
|
||||
keymaps
|
||||
modules
|
||||
mtab
|
||||
numlock
|
||||
procfs
|
||||
sysctl
|
@ -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
|
@ -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 $?
|
||||
}
|
3
init.d.NetBSD/.gitignore
vendored
3
init.d.NetBSD/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
swap-blk
|
||||
ttys
|
||||
wscons
|
@ -1,6 +0,0 @@
|
||||
DIR= ${INITDIR}
|
||||
SRCS= swap-blk.in ttys.in wscons.in
|
||||
BIN= ${OBJS}
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
@ -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
|
||||
|
1
init.d/Makefile.FreeBSD
Normal file
1
init.d/Makefile.FreeBSD
Normal file
@ -0,0 +1 @@
|
||||
SRCS+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in powerd.in syscons.in
|
2
init.d/Makefile.Linux
Normal file
2
init.d/Makefile.Linux
Normal file
@ -0,0 +1,2 @@
|
||||
SRCS+= hwclock.in consolefont.in keymaps.in modules.in mtab.in numlock.in \
|
||||
procfs.in
|
6
init.d/Makefile.NetBSD
Normal file
6
init.d/Makefile.NetBSD
Normal file
@ -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
|
@ -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
|
@ -23,6 +23,7 @@ fi
|
||||
|
||||
depend()
|
||||
{
|
||||
provide clock
|
||||
if yesno ${clock_adjfile}; then
|
||||
use root
|
||||
else
|
@ -16,26 +16,29 @@ 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 -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 \
|
||||
${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 \
|
||||
${ECHO} ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR}; \
|
||||
${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \
|
||||
fi; \
|
||||
done
|
||||
|
@ -1,5 +0,0 @@
|
||||
DIR= ${RC_LIB}/net
|
||||
INC= ifwatchd.sh
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
@ -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
|
||||
|
0
net/Makefile.FreeBSD
Normal file
0
net/Makefile.FreeBSD
Normal file
0
net/Makefile.Linux
Normal file
0
net/Makefile.Linux
Normal file
1
net/Makefile.NetBSD
Normal file
1
net/Makefile.NetBSD
Normal file
@ -0,0 +1 @@
|
||||
INC+= ifwatchd.sh
|
@ -11,7 +11,6 @@ include ${MK}/sys.mk
|
||||
include ${MK}/os.mk
|
||||
include ${MK}/gitignore.mk
|
||||
include Makefile.${OS}
|
||||
include Makefile.${SUBOS}
|
||||
|
||||
all:
|
||||
|
||||
|
@ -1 +1,5 @@
|
||||
BOOT+= clock dumpon syscons
|
||||
# Generic BSD stuff
|
||||
BOOT+= hostid net.lo0 newsyslog savecore syslogd
|
||||
|
||||
# FreeBSD specific stuff
|
||||
BOOT+= adjkerntz dumpon syscons
|
||||
|
@ -1,2 +1,2 @@
|
||||
BOOT+= clock consolefont keymaps modules mtab net.lo procfs
|
||||
BOOT+= hwclock consolefont keymaps modules mtab net.lo procfs
|
||||
DEFAULT+= hdparm
|
||||
|
@ -1 +1,5 @@
|
||||
# Generic BSD stuff
|
||||
BOOT+= hostid net.lo0 newsyslog savecore syslogd
|
||||
|
||||
# NetBSD specific stuff
|
||||
BOOT+= ttys wscons
|
||||
|
1
sh.BSD/.gitignore
vendored
1
sh.BSD/.gitignore
vendored
@ -1 +0,0 @@
|
||||
init.sh
|
@ -1,6 +0,0 @@
|
||||
DIR= ${RC_LIB}/sh
|
||||
SRCS= init.sh.in
|
||||
BIN= ${OBJS}
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
2
sh.Linux/.gitignore
vendored
2
sh.Linux/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
init-early.sh
|
||||
init.sh
|
@ -1,6 +0,0 @@
|
||||
DIR= ${RC_LIB}/sh
|
||||
SRCS= init-early.sh.in init.sh.in
|
||||
BIN= ${OBJS}
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
2
sh.NetBSD/.gitignore
vendored
2
sh.NetBSD/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
ifwatchd-carrier.sh
|
||||
ifwatchd-nocarrier.sh
|
@ -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
|
@ -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}
|
||||
|
@ -1 +0,0 @@
|
||||
NET_LO = net.lo0
|
8
sh/Makefile.FreeBSD
Normal file
8
sh/Makefile.FreeBSD
Normal file
@ -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} $< > $@
|
||||
|
@ -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} $< > $@
|
||||
|
||||
|
10
sh/Makefile.NetBSD
Normal file
10
sh/Makefile.NetBSD
Normal file
@ -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} $< > $@
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user