Compare commits
201 Commits
openrc-0.1
...
openrc-0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30fe99dead | ||
|
|
2d75eb7976 | ||
|
|
3663cf1e2a | ||
|
|
766ec96e3d | ||
|
|
a854fe6d61 | ||
|
|
619b0b4f37 | ||
|
|
c8248d05a0 | ||
|
|
5ae702339e | ||
|
|
d384502e57 | ||
|
|
bdaca0baf5 | ||
|
|
5188fd2592 | ||
|
|
5b800030f1 | ||
|
|
208443fa0e | ||
|
|
a818eebf7b | ||
|
|
10910876d1 | ||
|
|
35b4978152 | ||
|
|
cedd81801a | ||
|
|
e273b4e08e | ||
|
|
50cff8ebc8 | ||
|
|
aec83494d6 | ||
|
|
5ba6f0a628 | ||
|
|
5a59542629 | ||
|
|
52711bdca7 | ||
|
|
53902cefb8 | ||
|
|
75f991068d | ||
|
|
e499e58310 | ||
|
|
b08b6cd91b | ||
|
|
3c2b93fc9c | ||
|
|
b5d829789f | ||
|
|
1e3442f95d | ||
|
|
2bda1871a1 | ||
|
|
d3b111bd58 | ||
|
|
dbea63b76d | ||
|
|
6a5287dbb5 | ||
|
|
df8eeba2fb | ||
|
|
54fce42c6f | ||
|
|
54d7aa39dd | ||
|
|
dc5d63aa97 | ||
|
|
bab5d7767d | ||
|
|
799686e40d | ||
|
|
d83ae59cca | ||
|
|
18b4108755 | ||
|
|
e96347523f | ||
|
|
f0aacec02e | ||
|
|
57e1dd7389 | ||
|
|
c89b3763fb | ||
|
|
425abe40c5 | ||
|
|
725b9dc89c | ||
|
|
22d650c450 | ||
|
|
809ac86c69 | ||
|
|
b3310e8e10 | ||
|
|
29369c44c1 | ||
|
|
292fe3a568 | ||
|
|
99d5046a56 | ||
|
|
0e38dcc4d2 | ||
|
|
9176b77c23 | ||
|
|
fad61a7c4b | ||
|
|
0e114abf5d | ||
|
|
bc369085c7 | ||
|
|
6d8b36e09d | ||
|
|
8759735711 | ||
|
|
034b9b7a12 | ||
|
|
e82435c2f4 | ||
|
|
71dd280656 | ||
|
|
594d98eddc | ||
|
|
dcdfdb442f | ||
|
|
143239e143 | ||
|
|
5d38d4d6e9 | ||
|
|
c18c4fc4cc | ||
|
|
5ebe7f1349 | ||
|
|
6a227d0c45 | ||
|
|
403abe73de | ||
|
|
be82e950d7 | ||
|
|
3ca8387966 | ||
|
|
f5a9b42215 | ||
|
|
d370918f0c | ||
|
|
e995404e3b | ||
|
|
caa4704ce6 | ||
|
|
17d28fde42 | ||
|
|
b418f2e471 | ||
|
|
ee4e861796 | ||
|
|
11e33e81c8 | ||
|
|
5e8ed2aeca | ||
|
|
742310744d | ||
|
|
4e9b58b07d | ||
|
|
c564043f86 | ||
|
|
b3d1182a2f | ||
|
|
f6cb321f9f | ||
|
|
f85c6ca84c | ||
|
|
d09f9f47eb | ||
|
|
b271ac5af5 | ||
|
|
fccff6a4ed | ||
|
|
a1d555bdc4 | ||
|
|
ecba32d1ca | ||
|
|
a718975e08 | ||
|
|
15d34d0a16 | ||
|
|
864e17fabc | ||
|
|
cee3ccc4c1 | ||
|
|
f90f2914b9 | ||
|
|
ac834ddc56 | ||
|
|
8e71c03495 | ||
|
|
833903fc78 | ||
|
|
ccf238f852 | ||
|
|
55858eca2e | ||
|
|
ac037241a7 | ||
|
|
6af2b20297 | ||
|
|
1b40379a79 | ||
|
|
be1f9b0a93 | ||
|
|
e30ea10e6c | ||
|
|
3f37d4771b | ||
|
|
4f4b74e110 | ||
|
|
f06e186d43 | ||
|
|
5866d829bb | ||
|
|
068c90c82b | ||
|
|
59b27ad7eb | ||
|
|
85b480a6f2 | ||
|
|
ae9ce04468 | ||
|
|
c807b3a815 | ||
|
|
4d6b84290a | ||
|
|
08791ec4a2 | ||
|
|
a99b8d349c | ||
|
|
74bff8a931 | ||
|
|
a2a7f0740e | ||
|
|
9b2f7bce99 | ||
|
|
3d0fc150dc | ||
|
|
fc7e6a3ada | ||
|
|
748ddf28ed | ||
|
|
55eb3794fb | ||
|
|
08aff6ef44 | ||
|
|
0347f01345 | ||
|
|
5a80daaf43 | ||
|
|
64332a3675 | ||
|
|
821166fbfd | ||
|
|
79719b5386 | ||
|
|
486d517674 | ||
|
|
1c9c2f9fcf | ||
|
|
7b08276fa8 | ||
|
|
58caa0864f | ||
|
|
9ed5d28d15 | ||
|
|
02e7e1b988 | ||
|
|
a1b9768243 | ||
|
|
06635dedbc | ||
|
|
2715981ff9 | ||
|
|
ce644e1735 | ||
|
|
ec4721dd7f | ||
|
|
e1b09daaac | ||
|
|
bd34df6361 | ||
|
|
7beafe361a | ||
|
|
5dcdfcdf7a | ||
|
|
a4f9eb699b | ||
|
|
f7f3b6ae09 | ||
|
|
f6b47568ad | ||
|
|
85a6addd23 | ||
|
|
4079b4d65d | ||
|
|
eca292e5d9 | ||
|
|
fe90a548b5 | ||
|
|
494fb0a5f6 | ||
|
|
e505e6ea41 | ||
|
|
e47661449a | ||
|
|
04b0acb010 | ||
|
|
e598b7d2cd | ||
|
|
ec2d39d024 | ||
|
|
3b888b385a | ||
|
|
eea30772d4 | ||
|
|
d948e65d60 | ||
|
|
97abd91577 | ||
|
|
5f091395c7 | ||
|
|
6159a32f39 | ||
|
|
6d2e1f7add | ||
|
|
d9ec62b22a | ||
|
|
089caec283 | ||
|
|
64853c4916 | ||
|
|
0e6eb0f764 | ||
|
|
f69013adbe | ||
|
|
1443fee901 | ||
|
|
cdd3881c1b | ||
|
|
773d50dabb | ||
|
|
7b8215bbd3 | ||
|
|
51c825ceee | ||
|
|
b9eb450696 | ||
|
|
c74cfabe2e | ||
|
|
5d77c0db6b | ||
|
|
b2f7606b23 | ||
|
|
4c14666423 | ||
|
|
50a7697bf2 | ||
|
|
40930d7d0a | ||
|
|
1fd1472dde | ||
|
|
cb9da6a262 | ||
|
|
40e12f6ba0 | ||
|
|
568ec5f343 | ||
|
|
6f68c44a77 | ||
|
|
b7c0d8b43c | ||
|
|
52a3cc162b | ||
|
|
0fa512c2b5 | ||
|
|
656b79b51e | ||
|
|
8b23aaecff | ||
|
|
f20099bc33 | ||
|
|
a276050a54 | ||
|
|
c4a54605e0 | ||
|
|
df1377601b | ||
|
|
4742e1ec69 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
openrc-0.1.tar.bz2
|
openrc-0.1.tar.bz2
|
||||||
|
.gdb_history
|
||||||
|
.gdbinit
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -1,9 +1,9 @@
|
|||||||
# OpenRC Makefile
|
# OpenRC Makefile
|
||||||
# Copyright 2007-2008 Roy Marples
|
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# All rights reserved. Released under the 2-clause BSD license.
|
||||||
|
|
||||||
NAME= openrc
|
NAME= openrc
|
||||||
VERSION= 0.1
|
VERSION= 0.2.4
|
||||||
PKG= ${NAME}-${VERSION}
|
PKG= ${NAME}-${VERSION}
|
||||||
|
|
||||||
SUBDIR= conf.d doc etc init.d man net sh src
|
SUBDIR= conf.d doc etc init.d man net sh src
|
||||||
|
|||||||
@@ -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,7 @@
|
|||||||
DIR= ${CONFDIR}
|
DIR= ${CONFDIR}
|
||||||
CONF= bootmisc clock fsck hostname local net urandom
|
CONF= bootmisc fsck hostname local net urandom
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
|
include ${MK}/os.mk
|
||||||
|
include Makefile.${OS}
|
||||||
include ${MK}/scripts.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 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=""
|
||||||
@@ -5,8 +5,11 @@
|
|||||||
#modules_2_6="tun"
|
#modules_2_6="tun"
|
||||||
#modules="ohci1394"
|
#modules="ohci1394"
|
||||||
|
|
||||||
# Give the modules some arguments if needed.
|
# Give the modules some arguments if needed, per version if necessary.
|
||||||
# module_ieee1394_args="debug"
|
#module_ieee1394_args="debug"
|
||||||
|
#module_ieee1394_args_2_6_23_gentoo_r5="ieee1394 ohci1394"
|
||||||
|
#module_ieee1394_args_2_6_23="tun ieee1394"
|
||||||
|
#module_ieee1394_args_2_6="tun"
|
||||||
|
|
||||||
# You should consult your kernel documentation and configuration
|
# You should consult your kernel documentation and configuration
|
||||||
# for a list of modules and their options.
|
# for a list of modules and their options.
|
||||||
@@ -1,29 +1,25 @@
|
|||||||
# Kernel core dump options for FreeBSD kernel.
|
# Unless you're a kernel developer or driver writer then this won't
|
||||||
# Unless you're a FreeBSD kernel developer or driver writer then this won't
|
|
||||||
# be of any interest to you at all.
|
# be of any interest to you at all.
|
||||||
|
|
||||||
# The following options allow to configure the kernel's core dump
|
# The following options allow to configure the kernel's core dump
|
||||||
# facilities. Please read
|
# facilities.
|
||||||
# http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html
|
|
||||||
# for more information about Kernel core dumps and kernel debugging.
|
|
||||||
|
|
||||||
# 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
|
# 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
|
# partition, and has to be at least big enough to contain the whole
|
||||||
# physical memory (see hw.physmem sysctl(8) variable).
|
# physical memory (see hw.physmem sysctl(8) variable).
|
||||||
# When the variable is commented out, no core dump will be enabled for
|
# When the variable is commented out, no core dump will be enabled for
|
||||||
# the kernel.
|
# 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
|
# 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
|
# device. If unset, /var/crash will be used, as the default of
|
||||||
# FreeBSD.
|
# 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
|
# 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
|
# 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
|
# will be passed to savecore(8) that will proceed on compressing the
|
||||||
# dump.
|
# dump.
|
||||||
#KERNEL_DUMP_COMPRESS="NO"
|
#dump_compress=NO
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
DIR= ${DOCDIR}/openrc
|
|
||||||
INC= net.example
|
|
||||||
|
|
||||||
MK= ../mk
|
|
||||||
include ${MK}/scripts.mk
|
|
||||||
1
doc/.gitignore
vendored
Normal file
1
doc/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
net.example
|
||||||
@@ -2,4 +2,6 @@ DIR= ${DOCDIR}/openrc
|
|||||||
INC= net.example
|
INC= net.example
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
|
include ${MK}/os.mk
|
||||||
|
include Makefile.${OS}
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
5
doc/Makefile.FreeBSD
Normal file
5
doc/Makefile.FreeBSD
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
SRCS+= net.example.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
${CP} $< $@
|
||||||
5
doc/Makefile.Linux
Normal file
5
doc/Makefile.Linux
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
SRCS+= net.example.in
|
||||||
|
|
||||||
|
.SUFFIXES: .Linux.in
|
||||||
|
.Linux.in:
|
||||||
|
${CP} $< $@
|
||||||
5
doc/Makefile.NetBSD
Normal file
5
doc/Makefile.NetBSD
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
SRCS+= net.example.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
${CP} $< $@
|
||||||
@@ -87,6 +87,10 @@
|
|||||||
# is how long we wait for carrier. The current default is 3 seconds
|
# is how long we wait for carrier. The current default is 3 seconds
|
||||||
#carrier_timeout_eth0=-1
|
#carrier_timeout_eth0=-1
|
||||||
|
|
||||||
|
# You may wish to disable the interface being brought down when stopping.
|
||||||
|
# This is only of use for WakeOnLan.
|
||||||
|
#ifdown_eth0="NO"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# OPTIONAL MODULES
|
# OPTIONAL MODULES
|
||||||
|
|
||||||
@@ -120,6 +120,10 @@
|
|||||||
# tables you may have to set a global metric as the due to a simple read of
|
# tables you may have to set a global metric as the due to a simple read of
|
||||||
# the routing table taking over a minute at a time.
|
# the routing table taking over a minute at a time.
|
||||||
|
|
||||||
|
# You may wish to disable the interface being brought down when stopping.
|
||||||
|
# This is only of use for WakeOnLan.
|
||||||
|
#ifdown_eth0="NO"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# OPTIONAL MODULES
|
# OPTIONAL MODULES
|
||||||
|
|
||||||
@@ -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
|
|
||||||
1
etc.BSD/.gitignore → etc/.gitignore
vendored
1
etc.BSD/.gitignore → etc/.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
|
rc.conf
|
||||||
rc
|
rc
|
||||||
rc.shutdown
|
rc.shutdown
|
||||||
@@ -2,4 +2,6 @@ DIR= ${SYSCONFDIR}
|
|||||||
CONF= rc.conf
|
CONF= rc.conf
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
|
include ${MK}/os.mk
|
||||||
|
include Makefile.${OS}
|
||||||
include ${MK}/scripts.mk
|
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 rc.shutdown 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
|
||||||
3
etc/Makefile.NetBSD
Normal file
3
etc/Makefile.NetBSD
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
SED_EXTRA= -e 's:@TERM@:wsvt25:g'
|
||||||
|
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
||||||
|
BIN+= rc rc.shutdown
|
||||||
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
|
|
||||||
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
|
|
||||||
@@ -3,5 +3,8 @@ SRCS= avahi-dnsconfd.in avahid.in dbus.in hald.in named.in ntpd.in \
|
|||||||
openvpn.in polkitd.in sshd.in
|
openvpn.in polkitd.in sshd.in
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
|
|
||||||
|
SED_EXTRA+= -e 's:@VARBASE@:/var:g'
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
include Makefile.${OS}
|
include Makefile.${OS}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# All rights reserved. Released under the 2-clause BSD license.
|
# All rights reserved. Released under the 2-clause BSD license.
|
||||||
|
|
||||||
command=@PKG_PREFIX@/bin/dbus-daemon
|
command=@PKG_PREFIX@/bin/dbus-daemon
|
||||||
pidfile=@VARBASE@/run/dbus/dbus.pid
|
pidfile=@VARBASE@/run/dbus/pid
|
||||||
command_args="${dbusd_args---system}"
|
command_args="${dbusd_args---system}"
|
||||||
name="Message Bus Daemon"
|
name="Message Bus Daemon"
|
||||||
|
|
||||||
@@ -15,5 +15,5 @@ depend()
|
|||||||
|
|
||||||
start_pre()
|
start_pre()
|
||||||
{
|
{
|
||||||
mkdir -p $(dirname $pidfile)
|
mkdir -p $(dirname $pidfile)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ depend()
|
|||||||
|
|
||||||
reload()
|
reload()
|
||||||
{
|
{
|
||||||
ebegin "Reloading ${SVCNAME}"
|
ebegin "Reloading ${RC_SVCNAME}"
|
||||||
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
|
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,22 @@
|
|||||||
|
|
||||||
command=/usr/sbin/named
|
command=/usr/sbin/named
|
||||||
command_args=${named_args}
|
command_args=${named_args}
|
||||||
pidfile=@VARBASE@/run/named/pid
|
pidfile=@VARBASE@/run/named.pid
|
||||||
name="Domain Name server"
|
name="Domain Name server"
|
||||||
extra_started_commands="reload"
|
extra_started_commands="reload"
|
||||||
|
|
||||||
namedb=/etc/namedb
|
namedb=/etc/namedb
|
||||||
named_uid=${named_uid:-bind}
|
uid=named
|
||||||
|
case "${RC_UNAME}" in
|
||||||
|
FreeBSD)
|
||||||
|
uid=bind
|
||||||
|
pidfile=@VARBASE@/run/named/pid
|
||||||
|
;;
|
||||||
|
Linux)
|
||||||
|
uid=bind
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
named_uid=${named_uid:-${uid}}
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
@@ -62,7 +72,7 @@ start_pre()
|
|||||||
# Copy local timezone information if it is not up to date.
|
# Copy local timezone information if it is not up to date.
|
||||||
if [ -r /etc/localtime ]; then
|
if [ -r /etc/localtime ]; then
|
||||||
cmp -s /etc/localtime "${named_chroot}/etc/localtime" ||
|
cmp -s /etc/localtime "${named_chroot}/etc/localtime" ||
|
||||||
cp -p /etc/localtime "${named_chroot}/etc/localtime"
|
cp -p /etc/localtime "${named_chroot}/etc/localtime"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command_args="${command_args} -t ${named_chroot}"
|
command_args="${command_args} -t ${named_chroot}"
|
||||||
@@ -72,7 +82,7 @@ start_pre()
|
|||||||
|
|
||||||
if [ ! -s "${named_chroot}${namedb}/rndc.conf" ]; then
|
if [ ! -s "${named_chroot}${namedb}/rndc.conf" ]; then
|
||||||
local confgen="${command%/named}/rndc-confgen -a -b256 -u ${named_uid} \
|
local confgen="${command%/named}/rndc-confgen -a -b256 -u ${named_uid} \
|
||||||
-c ${named_chrootdir}/etc/namedb/rndc.key"
|
-c ${named_chrootdir}/etc/namedb/rndc.key"
|
||||||
if [ -s "${named_chroot}${namedb}/rndc.key" ]; then
|
if [ -s "${named_chroot}${namedb}/rndc.key" ]; then
|
||||||
local getuser="stat -f%Su"
|
local getuser="stat -f%Su"
|
||||||
[ "${RC_UNAME}" = "Linux" ] && getuser="stat -c%U"
|
[ "${RC_UNAME}" = "Linux" ] && getuser="stat -c%U"
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
||||||
# All rights reserved. Released under the 2-clause BSD license.
|
# All rights reserved. Released under the 2-clause BSD license.
|
||||||
|
|
||||||
vpn=${SVCNAME#*.}
|
vpn=${RC_SVCNAME#*.}
|
||||||
name="OpenVPN"
|
name="OpenVPN"
|
||||||
[ "${vpn}" != "openvpn" ] && name="${name} (${vpn})"
|
[ "${vpn}" != "openvpn" ] && name="${name} (${vpn})"
|
||||||
command=@PKG_PREFIX@/sbin/openvpn
|
command=@PKG_PREFIX@/sbin/openvpn
|
||||||
|
|
||||||
pidfile=@VARBASE@/run/"${SVCNAME}".pid
|
pidfile=@VARBASE@/run/"${RC_SVCNAME}".pid
|
||||||
openvpn_dir=${openvpn_dir:-@PKG_PREFIX@/etc/openvpn}
|
openvpn_dir=${openvpn_dir:-@PKG_PREFIX@/etc/openvpn}
|
||||||
openvpn_config=${openvpn_config:-${openvpn_dir}/${vpn}.conf}
|
openvpn_config=${openvpn_config:-${openvpn_dir}/${vpn}.conf}
|
||||||
command_args="${openvpn_args} --daemon --config ${openvpn_config} --writepid ${pidfile}"
|
command_args="${openvpn_args} --daemon --config ${openvpn_config} --writepid ${pidfile}"
|
||||||
|
|||||||
30
init.d/.gitignore
vendored
30
init.d/.gitignore
vendored
@@ -7,4 +7,34 @@ localmount
|
|||||||
netmount
|
netmount
|
||||||
root
|
root
|
||||||
swap
|
swap
|
||||||
|
sysctl
|
||||||
urandom
|
urandom
|
||||||
|
hostid
|
||||||
|
moused
|
||||||
|
newsyslog
|
||||||
|
pf
|
||||||
|
rarpd
|
||||||
|
rc-enabled
|
||||||
|
rpcbind
|
||||||
|
savecore
|
||||||
|
syslogd
|
||||||
|
adjkerntz
|
||||||
|
devd
|
||||||
|
dumpon
|
||||||
|
ipfw
|
||||||
|
mixer
|
||||||
|
nscd
|
||||||
|
powerd
|
||||||
|
syscons
|
||||||
|
net.lo
|
||||||
|
ttys
|
||||||
|
swap-blk
|
||||||
|
wscons
|
||||||
|
consolefont
|
||||||
|
hwclock
|
||||||
|
keymaps
|
||||||
|
modules
|
||||||
|
mtab
|
||||||
|
numlock
|
||||||
|
procfs
|
||||||
|
termencoding
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
DIR= ${INITDIR}
|
DIR= ${INITDIR}
|
||||||
SRCS= bootmisc.in fsck.in halt.sh.in hostname.in local.in localmount.in \
|
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}
|
BIN= ${OBJS}
|
||||||
|
|
||||||
|
INSTALLAFTER= _installafter
|
||||||
|
CLEANFILES+= net.lo
|
||||||
|
TARGETS+= net.lo
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
|
include ${MK}/os.mk
|
||||||
|
include Makefile.${OS}
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
|
|
||||||
|
_installafter: realinstall
|
||||||
|
${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO}
|
||||||
|
|||||||
13
init.d/Makefile.FreeBSD
Normal file
13
init.d/Makefile.FreeBSD
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
NET_LO= net.lo0
|
||||||
|
|
||||||
|
# Generic BSD scripts
|
||||||
|
SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
|
||||||
|
rpcbind.in savecore.in syslogd.in
|
||||||
|
|
||||||
|
# These are FreeBSD specific
|
||||||
|
SRCS+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in \
|
||||||
|
powerd.in syscons.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
8
init.d/Makefile.Linux
Normal file
8
init.d/Makefile.Linux
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
NET_LO= net.lo
|
||||||
|
|
||||||
|
SRCS+= hwclock.in consolefont.in keymaps.in modules.in mtab.in numlock.in \
|
||||||
|
procfs.in termencoding.in
|
||||||
|
|
||||||
|
.SUFFIXES: .Linux.in
|
||||||
|
.Linux.in:
|
||||||
|
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
12
init.d/Makefile.NetBSD
Normal file
12
init.d/Makefile.NetBSD
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
NET_LO= net.lo0
|
||||||
|
|
||||||
|
# Generic BSD scripts
|
||||||
|
SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
|
||||||
|
rpcbind.in savecore.in syslogd.in
|
||||||
|
|
||||||
|
# These are NetBSD specific
|
||||||
|
SRCS+= swap-blk.in ttys.in wscons.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
@@ -16,6 +16,7 @@ fi
|
|||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
|
provide clock
|
||||||
# BSD adjkerntz needs to be able to write to /etc
|
# BSD adjkerntz needs to be able to write to /etc
|
||||||
if [ "${clock}" = "UTC" -a -e /etc/wall_cmos_clock ] ||
|
if [ "${clock}" = "UTC" -a -e /etc/wall_cmos_clock ] ||
|
||||||
[ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then
|
[ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then
|
||||||
@@ -46,7 +47,7 @@ save()
|
|||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
# Don't tweak the hardware clock on LiveCD halt.
|
# Don't tweak the hardware clock on LiveCD halt.
|
||||||
if yesno "${clock_systohc:-${CLOCK_SYSTOHC}}"; then
|
if yesno "${clock_systohc:-${CLOCK_SYSTOHC}}"; then
|
||||||
[ -z "${CDBOOT}" ] && save
|
[ -z "${CDBOOT}" ] && save
|
||||||
fi
|
fi
|
||||||
@@ -11,40 +11,45 @@ depend()
|
|||||||
keyword noprefix
|
keyword noprefix
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dir_writeable()
|
||||||
|
{
|
||||||
|
mkdir "$1"/.test.$$ 2>/dev/null && rmdir "$1"/.test.$$
|
||||||
|
}
|
||||||
|
|
||||||
cleanup_tmp_dir()
|
cleanup_tmp_dir()
|
||||||
{
|
{
|
||||||
local dir=$1
|
local dir="$1"
|
||||||
|
|
||||||
mkdir -p "${dir}"
|
if ! [ -d "${dir}" ]; then
|
||||||
|
mkdir -p "${dir}" || return $?
|
||||||
|
fi
|
||||||
|
dir_writeable "${dir}" || return 1
|
||||||
|
chmod +t "${dir}"
|
||||||
cd "${dir}"
|
cd "${dir}"
|
||||||
if yesno ${wipe_tmp:-${WIPE_TMP:-yes}}; then
|
if yesno ${wipe_tmp:-${WIPE_TMP:-yes}}; then
|
||||||
ebegin "Wiping ${dir} directory"
|
ebegin "Wiping ${dir} directory"
|
||||||
local startopts="-x . -depth" delete="-exec rm -rf -- {} ;"
|
local startopts="-x . -depth"
|
||||||
|
[ "${RC_UNAME}" = "Linux" ] && startopts=". -xdev -depth"
|
||||||
if [ "${RC_UNAME}" = "Linux" ]; then
|
|
||||||
startopts=". -xdev -depth"
|
|
||||||
# busybox find / rm cannot handle --
|
|
||||||
delete="-delete"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Faster than find
|
# Faster than find
|
||||||
rm -rf -- [b-ikm-pr-zA-Z0-9\.]*
|
rm -rf -- [b-ikm-pr-zA-Z0-9\.]*
|
||||||
|
|
||||||
find ${startopts} ! -name . \
|
find ${startopts} ! -name . \
|
||||||
! -path ./lost+found \
|
! -path "./lost+found" \
|
||||||
! -path "./lost+found/*" \
|
! -path "./lost+found/*" \
|
||||||
! -path ./quota.user \
|
! -path "./quota.user" \
|
||||||
! -path "./quota.user/*" \
|
! -path "./quota.user/*" \
|
||||||
! -path ./aquota.user \
|
! -path "./aquota.user" \
|
||||||
! -path "./aquota.user/*" \
|
! -path "./aquota.user/*" \
|
||||||
! -path ./quota.group \
|
! -path "./quota.group" \
|
||||||
! -path "./quota.group/*" \
|
! -path "./quota.group/*" \
|
||||||
! -path ./aquota.group \
|
! -path "./aquota.group" \
|
||||||
! -path "./aquota.group/*" \
|
! -path "./aquota.group/*" \
|
||||||
! -path ./journal \
|
! -path "./journal" \
|
||||||
! -path "./journal/*" \
|
! -path "./journal/*" \
|
||||||
${delete} \
|
! -path "./.private" \
|
||||||
-type d -prune
|
! -path "./.private/*" \
|
||||||
|
-exec rm -rf {} \;
|
||||||
eend 0
|
eend 0
|
||||||
else
|
else
|
||||||
ebegin "Cleaning ${dir} directory"
|
ebegin "Cleaning ${dir} directory"
|
||||||
@@ -58,12 +63,7 @@ cleanup_tmp_dir()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
if ! mkdir /.test.$$ 2>/dev/null; then
|
local logw=false
|
||||||
ewarn "Skipping /var and /tmp initialization (ro root?)"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
rmdir /.test.$$
|
|
||||||
|
|
||||||
# Ensure that our basic dirs exist
|
# Ensure that our basic dirs exist
|
||||||
for x in /var/log /var/run /tmp; do
|
for x in /var/log /var/run /tmp; do
|
||||||
if ! [ -d "${x}" ]; then
|
if ! [ -d "${x}" ]; then
|
||||||
@@ -74,57 +74,66 @@ start()
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ebegin "Creating user login records"
|
if dir_writeable /var/run; then
|
||||||
cp /dev/null /var/run/utmp
|
ebegin "Creating user login records"
|
||||||
[ -e /var/log/wtmp ] || cp /dev/null /var/log/wtmp
|
cp /dev/null /var/run/utmp
|
||||||
chmod 0644 /var/run/utmp /var/log/wtmp
|
if dir_writeable /var/log; then
|
||||||
eend 0
|
logw=true
|
||||||
|
[ -e /var/log/wtmp ] || cp /dev/null /var/log/wtmp
|
||||||
|
chmod 0644 /var/run/utmp /var/log/wtmp
|
||||||
|
fi
|
||||||
|
eend 0
|
||||||
|
|
||||||
ebegin "Cleaning /var/run"
|
ebegin "Cleaning /var/run"
|
||||||
for x in $(find /var/run ! -type d ! -name utmp ! -name random-seed \
|
for x in $(find /var/run ! -type d ! -name utmp \
|
||||||
! -name ld-elf.so.hints ! -name ld.so.hints);
|
! -name random-seed \
|
||||||
do
|
! -name ld-elf.so.hints ! -name ld.so.hints);
|
||||||
[ ! -f "${x}" ] && continue
|
do
|
||||||
# Do not remove pidfiles of already running daemons
|
[ ! -f "${x}" ] && continue
|
||||||
case "${x}" in
|
# Do not remove pidfiles of already running daemons
|
||||||
*.pid)
|
case "${x}" in
|
||||||
start-stop-daemon --test --quiet --stop \
|
*.pid)
|
||||||
--pidfile "${x}"
|
start-stop-daemon --test --quiet \
|
||||||
[ $? -eq 0 ] && continue
|
--stop --pidfile "${x}" && continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
rm -f -- "${x}"
|
rm -f -- "${x}"
|
||||||
done
|
done
|
||||||
eend 0
|
eend 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean up /tmp directories
|
# Clean up /tmp directories
|
||||||
local tmp=
|
local tmp=
|
||||||
for tmp in ${wipe_tmp_dirs-/tmp}; do
|
for tmp in ${wipe_tmp_dirs-/tmp}; do
|
||||||
cleanup_tmp_dir "${tmp}"
|
cleanup_tmp_dir "${tmp}"
|
||||||
done
|
done
|
||||||
chmod +t /tmp /var/tmp
|
|
||||||
|
|
||||||
# Make sure our X11 stuff have the correct permissions
|
if dir_writeable /tmp; then
|
||||||
# Omit the chown as bootmisc is run before network is up
|
# Make sure our X11 stuff have the correct permissions
|
||||||
# and users may be using lame LDAP auth #139411
|
# Omit the chown as bootmisc is run before network is up
|
||||||
rm -rf /tmp/.ICE-unix /tmp/.X11-unix
|
# and users may be using lame LDAP auth #139411
|
||||||
mkdir -p /tmp/.ICE-unix /tmp/.X11-unix
|
rm -rf /tmp/.ICE-unix /tmp/.X11-unix
|
||||||
chmod 1777 /tmp/.ICE-unix /tmp/.X11-unix
|
mkdir -p /tmp/.ICE-unix /tmp/.X11-unix
|
||||||
[ -x /sbin/restorecon ] && restorecon /tmp/.ICE-unix /tmp/.X11-unix
|
chmod 1777 /tmp/.ICE-unix /tmp/.X11-unix
|
||||||
|
[ -x /sbin/restorecon ] && restorecon /tmp/.ICE-unix /tmp/.X11-unix
|
||||||
|
fi
|
||||||
|
|
||||||
# Create an 'after-boot' dmesg log
|
if ${logw} || dir_writeable /var/log; then
|
||||||
if [ "${RC_SYS}" != "VSERVER" -a "${RC_SYS}" != "OPENVZ" ]; then
|
# Create an 'after-boot' dmesg log
|
||||||
dmesg > /var/log/dmesg
|
if [ "${RC_SYS}" != "VSERVER" -a "${RC_SYS}" != "OPENVZ" ]; then
|
||||||
chmod 640 /var/log/dmesg
|
dmesg > /var/log/dmesg
|
||||||
|
chmod 640 /var/log/dmesg
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f /etc/nologin
|
rm -f /etc/nologin
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
# Write a halt record if we're shutting down
|
# Write a halt record if we're shutting down
|
||||||
case "${RC_SOFTLEVEL}" in
|
case "${RC_RUNLEVEL}" in
|
||||||
reboot|shutdown) [ "${RC_UNAME}" = "Linux" ] && halt -w;;
|
reboot|shutdown) [ "${RC_UNAME}" = "Linux" ] && halt -w;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ description="Sets a font for the consoles."
|
|||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
need localmount
|
need localmount termencoding
|
||||||
need keymaps # sets up terminal encoding scheme
|
|
||||||
after hotplug
|
after hotplug
|
||||||
keyword noopenvz noprefix nouml novserver noxenu
|
keyword noopenvz noprefix nouml novserver noxenu
|
||||||
}
|
}
|
||||||
@@ -34,7 +33,7 @@ start()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local x= param= sf_param= retval=0 ttydev=
|
local x= param= sf_param= retval=0 ttydev=/dev/tty
|
||||||
|
|
||||||
# Get additional parameters
|
# Get additional parameters
|
||||||
if [ -n "${consoletranslation}" ]; then
|
if [ -n "${consoletranslation}" ]; then
|
||||||
@@ -45,11 +44,8 @@ start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the console font
|
# Set the console font
|
||||||
ebegin "Setting user font"
|
ebegin "Setting console font [${consolefont}]"
|
||||||
[ -d /dev/vc ] \
|
[ -d /dev/vc ] && ttydev=/dev/vc/
|
||||||
&& ttydev=/dev/vc/ \
|
|
||||||
|| ttydev=/dev/tty
|
|
||||||
|
|
||||||
x=1
|
x=1
|
||||||
while [ ${x} -le ${ttyn} ]; do
|
while [ ${x} -le ${ttyn} ]; do
|
||||||
setfont ${consolefont} ${param} -C ${ttydev}${x} >/dev/null
|
setfont ${consolefont} ${param} -C ${ttydev}${x} >/dev/null
|
||||||
@@ -61,17 +57,17 @@ start()
|
|||||||
# Store the last font so we can use it ASAP on boot
|
# Store the last font so we can use it ASAP on boot
|
||||||
if [ ${retval} -eq 0 -a -w "${RC_LIBDIR}" ]; then
|
if [ ${retval} -eq 0 -a -w "${RC_LIBDIR}" ]; then
|
||||||
mkdir -p "${RC_LIBDIR}"/console
|
mkdir -p "${RC_LIBDIR}"/console
|
||||||
|
|
||||||
for font in /usr/share/consolefonts/"${consolefont}".*; do
|
for font in /usr/share/consolefonts/"${consolefont}".*; do
|
||||||
:
|
:
|
||||||
done
|
done
|
||||||
cp "${font}" "${RC_LIBDIR}"/console
|
cp "${font}" "${RC_LIBDIR}"/console
|
||||||
echo "${font##*/}" > "${RC_LIBDIR}"/console/font
|
echo "${font##*/}" > "${RC_LIBDIR}"/console/font
|
||||||
if yesno ${unicode:-${UNICODE}}; then
|
if yesno ${unicode:-${UNICODE}}; then
|
||||||
cp /dev/null "${RC_LIBDIR}"/console/unicode
|
echo "" > "${RC_LIBDIR}"/console/unicode
|
||||||
else
|
else
|
||||||
rm -f "${RC_LIBDIR}"/console/unicode
|
rm -f "${RC_LIBDIR}"/console/unicode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return ${retval}
|
return ${retval}
|
||||||
@@ -14,9 +14,9 @@ depend() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_pre() {
|
start_pre() {
|
||||||
sysctl hw.bus.devctl_disable=0 >/dev/null
|
sysctl hw.bus.devctl_disable=0 >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_post() {
|
stop_post() {
|
||||||
sysctl hw.bus.devctl_disable=1 >/dev/null
|
sysctl hw.bus.devctl_disable=1 >/dev/null
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ _abort() {
|
|||||||
|
|
||||||
# We should only reboot when first booting
|
# We should only reboot when first booting
|
||||||
_reboot() {
|
_reboot() {
|
||||||
if [ "${RC_SOFTLEVEL}" = "${RC_BOOTLEVEL}" ]; then
|
if [ "${RC_RUNLEVEL}" = "${RC_BOOTLEVEL}" ]; then
|
||||||
reboot "$@"
|
reboot "$@"
|
||||||
_abort || return 1
|
_abort || return 1
|
||||||
fi
|
fi
|
||||||
@@ -27,9 +27,21 @@ _reboot() {
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
local reboot_opts= fsck_opts= p=
|
local reboot_opts= fsck_opts= p= check_extra=
|
||||||
|
|
||||||
ebegin "Checking local filesystems"
|
if [ -e /fastboot ]; then
|
||||||
|
ewarn "Skipping fsck due to /fastboot"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ -e /forcefsck ]; then
|
||||||
|
fsck_opts="${fsck_opts} -f"
|
||||||
|
check_extra="(check forced)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${fsck_passno}" ]; then
|
||||||
|
check_extra="[passno ${fsck_passno}] ${check_extra}"
|
||||||
|
fi
|
||||||
|
ebegin "Checking local filesystems ${check_extra}"
|
||||||
for p in ${fsck_passno}; do
|
for p in ${fsck_passno}; do
|
||||||
local IFS="${_IFS}"
|
local IFS="${_IFS}"
|
||||||
case "${p}" in
|
case "${p}" in
|
||||||
@@ -40,7 +52,7 @@ start()
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "${RC_UNAME}" = "Linux" ]; then
|
if [ "${RC_UNAME}" = "Linux" ]; then
|
||||||
fsck_opts="-C0 -T"
|
fsck_opts="${fsck_opts} -C0 -T"
|
||||||
if [ -z "${fsck_passno}" ]; then
|
if [ -z "${fsck_passno}" ]; then
|
||||||
fsck_args=${fsck_args--A -p}
|
fsck_args=${fsck_args--A -p}
|
||||||
if echo 2>/dev/null >/.test.$$; then
|
if echo 2>/dev/null >/.test.$$; then
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ sync; sync
|
|||||||
# 1) we don't need (and by default can't) umount anything (VServer) or
|
# 1) we don't need (and by default can't) umount anything (VServer) or
|
||||||
# 2) the host utils take care of all umounting stuff (OpenVZ)
|
# 2) the host utils take care of all umounting stuff (OpenVZ)
|
||||||
if [ "${RC_SYS}" = "VSERVER" -o "${RC_SYS}" = "OPENVZ" ]; then
|
if [ "${RC_SYS}" = "VSERVER" -o "${RC_SYS}" = "OPENVZ" ]; then
|
||||||
|
[ "${RC_SYS}" = "OPENVZ" -a "$1" = "reboot" ] && echo "" > /reboot
|
||||||
if [ -e @SYSCONFDIR@/init.d/"$1".sh ]; then
|
if [ -e @SYSCONFDIR@/init.d/"$1".sh ]; then
|
||||||
. @SYSCONFDIR@/init.d/"$1".sh
|
. @SYSCONFDIR@/init.d/"$1".sh
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ fi
|
|||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
|
provide clock
|
||||||
if yesno ${clock_adjfile}; then
|
if yesno ${clock_adjfile}; then
|
||||||
use root
|
use root
|
||||||
else
|
else
|
||||||
@@ -87,7 +87,7 @@ start() {
|
|||||||
# Only IPs and nets in firewall_allowservices is allowed in.
|
# Only IPs and nets in firewall_allowservices is allowed in.
|
||||||
for i in ${ipfw_ip_in}; do
|
for i in ${ipfw_ip_in}; do
|
||||||
for p in ${ipfw_ports_in}; do
|
for p in ${ipfw_ports_in}; do
|
||||||
ipfw add pass tcp from ${i} to me ${p}
|
ipfw add pass tcp from ${i} to me ${p}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -8,13 +8,13 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
|
|||||||
unicode=${unicode:-${UNICODE}}
|
unicode=${unicode:-${UNICODE}}
|
||||||
keymap=${keymap:-${KEYMAP}}
|
keymap=${keymap:-${KEYMAP}}
|
||||||
extended_keymaps=${extended_keymaps:-${EXTENDED_KEYMAPS}}
|
extended_keymaps=${extended_keymaps:-${EXTENDED_KEYMAPS}}
|
||||||
windowskeys=${windowskeys:-${SET_WINDOWSKEYS}}
|
windowkeys=${windowkeys:-${SET_WINDOWSKEYS}}
|
||||||
fix_euro=${fix_euro:-${FIX_EURO}}
|
fix_euro=${fix_euro:-${FIX_EURO}}
|
||||||
dumpkeys_charset=${dumpkeys_charset:-${DUMPKEYS_CHARSET}}
|
dumpkeys_charset=${dumpkeys_charset:-${DUMPKEYS_CHARSET}}
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
need localmount
|
need localmount termencoding
|
||||||
keyword noopenvz noprefix nouml novserver noxenu
|
keyword noopenvz noprefix nouml novserver noxenu
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,43 +25,41 @@ start()
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local ttydev= n=
|
local ttydev=/dev/tty n=
|
||||||
[ -d /dev/vc ] \
|
[ -d /dev/vc ] && ttydev=/dev/vc/
|
||||||
&& ttydev=/dev/vc/ \
|
|
||||||
|| ttydev=/dev/tty
|
|
||||||
|
|
||||||
# Force linux keycodes for PPC.
|
# Force linux keycodes for PPC.
|
||||||
if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]; then
|
if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]; then
|
||||||
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
|
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ebegin "Loading key mappings"
|
ebegin "Loading key mappings [${keymap}]"
|
||||||
local loadkeys_uni= wkeys=
|
local loadkeys_uni= wkeys= kmode="-a" msg="ASCII"
|
||||||
yesno ${unicode} && loadkeys_uni="--unicode"
|
if yesno ${unicode}; then
|
||||||
yesno ${windowskeys} && wkeys="windowkeys"
|
loadkeys_uni="--unicode"
|
||||||
|
kmode="-u"
|
||||||
|
msg="UTF-8"
|
||||||
|
fi
|
||||||
|
yesno ${windowkeys} && wkeys="windowkeys"
|
||||||
loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
|
loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
|
||||||
eend $? "Error loading key mappings" || return $?
|
eend $? "Error loading key mappings" || return $?
|
||||||
|
|
||||||
if yesno ${fix_euro}; then
|
if yesno ${fix_euro}; then
|
||||||
|
ebegin "Fixing font for euro symbol"
|
||||||
# Fix some fonts displaying the Euro, #173528.
|
# Fix some fonts displaying the Euro, #173528.
|
||||||
echo "altgr keycode 18 = U+20AC" | loadkeys -q
|
echo "altgr keycode 18 = U+20AC" | loadkeys -q
|
||||||
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set terminal encoding to either ASCII or UNICODE.
|
# Set terminal encoding to either ASCII or UNICODE.
|
||||||
# See utf-8(7) for more information.
|
# See utf-8(7) for more information.
|
||||||
local termencoding="%@" termmsg="ASCII" kmode="-a"
|
ebegin "Setting keyboard mode [${msg}]"
|
||||||
if yesno ${unicode}; then
|
if yesno ${unicode}; then
|
||||||
dumpkeys ${dumpkeys_charset:+-c} \
|
dumpkeys ${dumpkeys_charset:+-c} \
|
||||||
${dumpkeys_charset} | loadkeys --unicode
|
${dumpkeys_charset} | loadkeys --unicode
|
||||||
termencoding="%G"
|
|
||||||
termmsg="UTF-8"
|
|
||||||
kmode="-u"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ebegin "Setting terminal encoding to" ${termmsg}
|
|
||||||
n=1
|
n=1
|
||||||
while [ ${n} -le "${ttyn}" ]; do
|
while [ ${n} -le "${ttyn}" ]; do
|
||||||
printf "\033%s" "${termencoding}" >"${ttydev}${n}"
|
|
||||||
kbd_mode "${kmode}" -C "${ttydev}${n}"
|
kbd_mode "${kmode}" -C "${ttydev}${n}"
|
||||||
n=$((${n} + 1))
|
n=$((${n} + 1))
|
||||||
done
|
done
|
||||||
@@ -23,7 +23,7 @@ start()
|
|||||||
x=${KV#*.*.}
|
x=${KV#*.*.}
|
||||||
local KV_MICRO=${x%%-*}
|
local KV_MICRO=${x%%-*}
|
||||||
|
|
||||||
local list= x= args= cnt=0
|
local list= x= xx= y= args= cnt=0
|
||||||
for x in "${KV}" \
|
for x in "${KV}" \
|
||||||
${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} \
|
${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} \
|
||||||
${KV_MAJOR}.${KV_MINOR} \
|
${KV_MAJOR}.${KV_MINOR} \
|
||||||
@@ -35,7 +35,15 @@ start()
|
|||||||
|
|
||||||
for x in ${list}; do
|
for x in ${list}; do
|
||||||
ebegin "Loading module ${x}"
|
ebegin "Loading module ${x}"
|
||||||
eval args=\$module_$(shell_var "${x}")_args
|
xx=$(shell_var "${x}")
|
||||||
|
for y in "${KV}" \
|
||||||
|
${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} \
|
||||||
|
${KV_MAJOR}.${KV_MINOR} \
|
||||||
|
; do
|
||||||
|
eval args=\$module_${xx}_args_$(shell_var "${y}")
|
||||||
|
[ -n "${args}" ] && break
|
||||||
|
done
|
||||||
|
[ -z "${args}" ] && eval args=\$module_${xx}_args
|
||||||
eval modprobe -q "${x}" "${args}"
|
eval modprobe -q "${x}" "${args}"
|
||||||
eend $? "Failed to load ${x}" && cnt=$((${cnt} + 1))
|
eend $? "Failed to load ${x}" && cnt=$((${cnt} + 1))
|
||||||
done
|
done
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
||||||
# All rights reserved. Released under the 2-clause BSD license.
|
# All rights reserved. Released under the 2-clause BSD license.
|
||||||
|
|
||||||
mouse=${SVCNAME##*.}
|
mouse=${RC_SVCNAME##*.}
|
||||||
if [ -n "${name}" -a "${mouse}" != "moused" ]; then
|
if [ -n "${name}" -a "${mouse}" != "moused" ]; then
|
||||||
moused_device=/dev/"${mouse}"
|
moused_device=/dev/"${mouse}"
|
||||||
pidfile=/var/run/moused-"${mouse}".pid
|
pidfile=/var/run/moused-"${mouse}".pid
|
||||||
@@ -15,7 +15,7 @@ __IFS="
|
|||||||
"
|
"
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
local IFACE=${SVCNAME#*.}
|
local IFACE=${RC_SVCNAME#*.}
|
||||||
local IFVAR=$(shell_var "${IFACE}")
|
local IFVAR=$(shell_var "${IFACE}")
|
||||||
|
|
||||||
need localmount
|
need localmount
|
||||||
@@ -28,7 +28,7 @@ depend()
|
|||||||
*) after net.lo net.lo0;;
|
*) after net.lo net.lo0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if type depend_${IFVAR} >/dev/null 2>&1; then
|
if [ "$(command -v "depend_${IFVAR}")" = "depend_${IFVAR}" ]; then
|
||||||
depend_${IFVAR}
|
depend_${IFVAR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ _load_modules()
|
|||||||
|
|
||||||
# Now load and wrap our functions
|
# Now load and wrap our functions
|
||||||
if ! . "${MODULESDIR}/${mod}.sh"; then
|
if ! . "${MODULESDIR}/${mod}.sh"; then
|
||||||
eend 1 "${SVCNAME}: error loading module \`${mod}'"
|
eend 1 "${RC_SVCNAME}: error loading module \`${mod}'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ _load_modules()
|
|||||||
# Wrap our provides
|
# Wrap our provides
|
||||||
local f=
|
local f=
|
||||||
for f in pre_start start post_start; do
|
for f in pre_start start post_start; do
|
||||||
eval "${provides}_${f}() { type ${mod}_${f} >/dev/null 2>&1 || return 0; ${mod}_${f} \"\$@\"; }"
|
eval "${provides}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
|
||||||
done
|
done
|
||||||
|
|
||||||
eval module_${mod}_provides="${provides}"
|
eval module_${mod}_provides="${provides}"
|
||||||
@@ -358,7 +358,7 @@ _load_modules()
|
|||||||
eval x=\$module_${mod}_provides
|
eval x=\$module_${mod}_provides
|
||||||
[ -z "${x}" ] && continue
|
[ -z "${x}" ] && continue
|
||||||
for f in pre_start start post_start; do
|
for f in pre_start start post_start; do
|
||||||
eval "${x}_${f}() { type ${mod}_${f} >/dev/null 2>&1 || return 0; ${mod}_${f} \"\$@\"; }"
|
eval "${x}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
|
||||||
done
|
done
|
||||||
eval module_${x}_providedby="${mod}"
|
eval module_${x}_providedby="${mod}"
|
||||||
;;
|
;;
|
||||||
@@ -447,7 +447,7 @@ _load_config()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
local IFACE=${SVCNAME#*.} oneworked=false module=
|
local IFACE=${RC_SVCNAME#*.} oneworked=false module=
|
||||||
local IFVAR=$(shell_var "${IFACE}") cmd= our_metric=
|
local IFVAR=$(shell_var "${IFACE}") cmd= our_metric=
|
||||||
local metric=0
|
local metric=0
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ start()
|
|||||||
# We up the iface twice if we have a preup to ensure it's up if
|
# We up the iface twice if we have a preup to ensure it's up if
|
||||||
# available in preup and afterwards incase the user inadvertently
|
# available in preup and afterwards incase the user inadvertently
|
||||||
# brings it down
|
# brings it down
|
||||||
if type preup >/dev/null 2>&1; then
|
if [ "$(command -v preup)" = "preup" ]; then
|
||||||
_up 2>/dev/null
|
_up 2>/dev/null
|
||||||
ebegin "Running preup"
|
ebegin "Running preup"
|
||||||
eindent
|
eindent
|
||||||
@@ -473,7 +473,7 @@ start()
|
|||||||
_up 2>/dev/null
|
_up 2>/dev/null
|
||||||
|
|
||||||
for module in ${MODULES}; do
|
for module in ${MODULES}; do
|
||||||
if type "${module}_pre_start" >/dev/null 2>&1; then
|
if [ "$(command -v "${module}_pre_start")" = "${module}_pre_start" ]; then
|
||||||
${module}_pre_start || exit $?
|
${module}_pre_start || exit $?
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -487,7 +487,7 @@ start()
|
|||||||
if ! _wait_for_carrier; then
|
if ! _wait_for_carrier; then
|
||||||
if service_started devd; then
|
if service_started devd; then
|
||||||
ewarn "no carrier, but devd will start us when we have one"
|
ewarn "no carrier, but devd will start us when we have one"
|
||||||
mark_service_inactive "${SVCNAME}"
|
mark_service_inactive "${RC_SVCNAME}"
|
||||||
else
|
else
|
||||||
eerror "no carrier"
|
eerror "no carrier"
|
||||||
fi
|
fi
|
||||||
@@ -522,7 +522,7 @@ start()
|
|||||||
null) :;;
|
null) :;;
|
||||||
[0-9]*|*:*) _add_address ${config};;
|
[0-9]*|*:*) _add_address ${config};;
|
||||||
*)
|
*)
|
||||||
if type "${config}_start" >/dev/null 2>&1; then
|
if [ "$(command -v "${config}_start")" = "${config}_start" ]; then
|
||||||
"${config}"_start
|
"${config}"_start
|
||||||
else
|
else
|
||||||
eerror "nothing provides \`${config}'"
|
eerror "nothing provides \`${config}'"
|
||||||
@@ -547,7 +547,7 @@ start()
|
|||||||
done
|
done
|
||||||
|
|
||||||
if ! ${oneworked}; then
|
if ! ${oneworked}; then
|
||||||
if type failup >/dev/null 2>&1; then
|
if [ "$(command -v failup)" = "failup" ]; then
|
||||||
ebegin "Running failup"
|
ebegin "Running failup"
|
||||||
eindent
|
eindent
|
||||||
failup
|
failup
|
||||||
@@ -600,12 +600,12 @@ ${routes}"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for module in ${MODULES}; do
|
for module in ${MODULES}; do
|
||||||
if type "${module}_post_start" >/dev/null 2>&1; then
|
if [ "$(command -v "${module}_post_start")" = "${module}_post_start" ]; then
|
||||||
${module}_post_start || exit $?
|
${module}_post_start || exit $?
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if type postup >/dev/null 2>&1; then
|
if [ "$(command -v postup)" = "postup" ]; then
|
||||||
ebegin "Running postup"
|
ebegin "Running postup"
|
||||||
eindent
|
eindent
|
||||||
postup
|
postup
|
||||||
@@ -617,7 +617,7 @@ ${routes}"
|
|||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
local IFACE=${SVCNAME#*.} module=
|
local IFACE=${RC_SVCNAME#*.} module=
|
||||||
local IFVAR=$(shell_var "${IFACE}") opts=
|
local IFVAR=$(shell_var "${IFACE}") opts=
|
||||||
|
|
||||||
einfo "Bringing down interface ${IFACE}"
|
einfo "Bringing down interface ${IFACE}"
|
||||||
@@ -628,7 +628,7 @@ stop()
|
|||||||
_load_modules false
|
_load_modules false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if type predown >/dev/null 2>&1; then
|
if [ "$(command -v predown)" = "predown" ]; then
|
||||||
ebegin "Running predown"
|
ebegin "Running predown"
|
||||||
eindent
|
eindent
|
||||||
predown || return 1
|
predown || return 1
|
||||||
@@ -641,35 +641,40 @@ stop()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for module in ${MODULES}; do
|
for module in ${MODULES}; do
|
||||||
if type "${module}_pre_stop" >/dev/null 2>&1; then
|
if [ "$(command -v "${module}_pre_stop")" = "${module}_pre_stop" ]; then
|
||||||
${module}_pre_stop || exit $?
|
${module}_pre_stop || exit $?
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for module in ${MODULES}; do
|
for module in ${MODULES}; do
|
||||||
if type "${module}_stop" >/dev/null 2>&1; then
|
if [ "$(command -v "${module}_stop")" = "${module}_stop" ]; then
|
||||||
${module}_stop
|
${module}_stop
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Only delete addresses for non PPP interfaces
|
# Only delete addresses for non PPP interfaces
|
||||||
if ! type is_ppp >/dev/null 2>&1 || ! is_ppp; then
|
if ! [ "$(command -v is_ppp)" = "is_ppp" ] || ! is_ppp; then
|
||||||
_delete_addresses "${IFACE}"
|
_delete_addresses "${IFACE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for module in ${MODULES}; do
|
for module in ${MODULES}; do
|
||||||
if type "${module}_post_stop" >/dev/null 2>&1; then
|
if [ "$(command -v "${module}_post_stop")" = "${module}_post_stop" ]; then
|
||||||
${module}_post_stop
|
${module}_post_stop
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
! yesno ${IN_BACKGROUND} && \
|
# If not in background, and not loopback then bring the interface down
|
||||||
[ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] && \
|
# unless overridden.
|
||||||
_down 2>/dev/null
|
if ! yesno ${IN_BACKGROUND} && \
|
||||||
|
[ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
|
||||||
|
eval module=\$ifdown_${IFVAR}
|
||||||
|
module=${module:-YES}
|
||||||
|
yesno ${module} && _down 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
type resolvconf >/dev/null 2>&1 && resolvconf -d "${IFACE}" 2>/dev/null
|
type resolvconf >/dev/null 2>&1 && resolvconf -d "${IFACE}" 2>/dev/null
|
||||||
|
|
||||||
if type postdown >/dev/null 2>&1; then
|
if [ "$(command -v "postdown")" = "postdown" ]; then
|
||||||
ebegin "Running postdown"
|
ebegin "Running postdown"
|
||||||
eindent
|
eindent
|
||||||
postdown
|
postdown
|
||||||
@@ -23,17 +23,18 @@ depend()
|
|||||||
{
|
{
|
||||||
# Only have portmap as a dependency if there is a nfs mount in fstab
|
# Only have portmap as a dependency if there is a nfs mount in fstab
|
||||||
# that is set to mount at boot
|
# that is set to mount at boot
|
||||||
local pmap=""
|
local pmap=
|
||||||
if need_portmap; then
|
if need_portmap; then
|
||||||
pmap="${pmap} rpc.statd"
|
pmap="rpc.statd"
|
||||||
[ -x @SYSCONFDIR@/init.d/rpcbind ] \
|
[ -x @SYSCONFDIR@/init.d/rpcbind ] \
|
||||||
&& pmap="rpcbind" \
|
&& pmap="${pmap} rpcbind" \
|
||||||
|| pmap="portmap"
|
|| pmap="${pmap} portmap"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
config /etc/fstab
|
config /etc/fstab
|
||||||
need net ${pmap}
|
need net ${pmap}
|
||||||
use afc-client amd autofs dns nfs nfsmount portmap rpcbind rpc.statd
|
use afc-client amd autofs openvpn
|
||||||
|
use dns nfs nfsmount portmap rpcbind rpc.statd
|
||||||
keyword nojail noopenvz noprefix novserver
|
keyword nojail noopenvz noprefix novserver
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,14 +47,14 @@ start()
|
|||||||
for x in ${net_fs_list}; do
|
for x in ${net_fs_list}; do
|
||||||
case "${x}" in
|
case "${x}" in
|
||||||
nfs|nfs4)
|
nfs|nfs4)
|
||||||
# If the nfsmount script took care of the nfs
|
# If the nfsmount script took care of the nfs
|
||||||
# filesystems, then there's no point in trying
|
# filesystems, then there's no point in trying
|
||||||
# them twice
|
# them twice
|
||||||
service_started nfsmount && continue
|
service_started nfsmount && continue
|
||||||
|
|
||||||
# Only try to mount NFS filesystems if portmap was
|
# Only try to mount NFS filesystems if portmap was
|
||||||
# started. This is to fix "hang" problems for new
|
# started. This is to fix "hang" problems for new
|
||||||
# users who do not add portmap to the default runlevel.
|
# users who do not add portmap to the default runlevel.
|
||||||
if need_portmap && ! service_started "${pmap}"; then
|
if need_portmap && ! service_started "${pmap}"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ start()
|
|||||||
local usbfs=$(grep -Fow usbfs /proc/filesystems ||
|
local usbfs=$(grep -Fow usbfs /proc/filesystems ||
|
||||||
grep -Fow usbdevfs /proc/filesystems)
|
grep -Fow usbdevfs /proc/filesystems)
|
||||||
if [ -n "${usbfs}" ]; then
|
if [ -n "${usbfs}" ]; then
|
||||||
ebegin "Mounting USB device filesystem (${usbfs})"
|
ebegin "Mounting USB device filesystem [${usbfs}]"
|
||||||
local usbgid="$(getent group usb | \
|
local usbgid="$(getent group usb | \
|
||||||
sed -e 's/.*:.*:\(.*\):.*/\1/')"
|
sed -e 's/.*:.*:\(.*\):.*/\1/')"
|
||||||
mount -t ${usbfs} \
|
mount -t ${usbfs} \
|
||||||
@@ -24,9 +24,7 @@ start()
|
|||||||
done
|
done
|
||||||
|
|
||||||
# If we have an init script for this service, continue
|
# If we have an init script for this service, continue
|
||||||
[ -x @SYSCONFDIR@/init.d/"${service}" ] && continue
|
rc-service --exists "${service}" && continue
|
||||||
[ -x @PKG_PREFIX@/@SYSCONFDIR@/init.d/"${service}" ] && continue
|
|
||||||
[ -x @LOCAL_PREFIX@/@SYSCONFDIR@/init.d/"${service}" ] && continue
|
|
||||||
|
|
||||||
# Ensure that the users rc.conf will start us - ignore the defaults
|
# Ensure that the users rc.conf will start us - ignore the defaults
|
||||||
eval enabled=\$${svc##*/}_enable
|
eval enabled=\$${svc##*/}_enable
|
||||||
@@ -13,7 +13,7 @@ depend()
|
|||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
if echo 2>/dev/null >/.test.$$; then
|
if echo 2>/dev/null >/.test.$$; then
|
||||||
rm -f /.test.$$
|
rm -f /.test.$$ /fastboot /forcefsck
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -22,5 +22,7 @@ start()
|
|||||||
Linux) mount -n -o remount,rw /;;
|
Linux) mount -n -o remount,rw /;;
|
||||||
*) mount -u -o rw /;;
|
*) mount -u -o rw /;;
|
||||||
esac
|
esac
|
||||||
eend $? "Root filesystem could not be mounted read/write"
|
if eend $? "Root filesystem could not be mounted read/write"; then
|
||||||
|
rm -f /fastboot /forcefsck
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ start() {
|
|||||||
|
|
||||||
local v= f=
|
local v= f=
|
||||||
for v in font8x16 font8x14 font8x8; do
|
for v in font8x16 font8x14 font8x8; do
|
||||||
f=$(eval \$"${v}")
|
eval f=\$${v}
|
||||||
if [ -n "${f}" ]; then
|
if [ -n "${f}" ]; then
|
||||||
ebegin "Setting font ${f}"
|
ebegin "Setting font ${f}"
|
||||||
vidcontrol -f ${v##FONT} ${f}
|
vidcontrol -f ${v##font} ${f}
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -12,9 +12,8 @@ depend()
|
|||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
[ -e /etc/sysctl.conf ] || return 0
|
[ -e /etc/sysctl.conf ] || return 0
|
||||||
|
|
||||||
ebegin "Configuring kernel parameters"
|
|
||||||
local retval=0 var= comments=
|
local retval=0 var= comments=
|
||||||
|
ebegin "Configuring kernel parameters"
|
||||||
while read var comments; do
|
while read var comments; do
|
||||||
case "${var}" in
|
case "${var}" in
|
||||||
""|"#"*) continue;;
|
""|"#"*) continue;;
|
||||||
@@ -22,5 +21,4 @@ start()
|
|||||||
sysctl -w "${var}" >/dev/null || retval=1
|
sysctl -w "${var}" >/dev/null || retval=1
|
||||||
done < /etc/sysctl.conf
|
done < /etc/sysctl.conf
|
||||||
eend ${retval} "Some errors were encountered"
|
eend ${retval} "Some errors were encountered"
|
||||||
eend $?
|
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,6 @@ start()
|
|||||||
{
|
{
|
||||||
[ -e /etc/sysctl.conf ] || return 0
|
[ -e /etc/sysctl.conf ] || return 0
|
||||||
ebegin "Configuring kernel parameters"
|
ebegin "Configuring kernel parameters"
|
||||||
sysctl -p /etc/sysctl.conf >/dev/null
|
sysctl -p >/dev/null
|
||||||
eend $?
|
eend $? "Some errors were encountered"
|
||||||
}
|
}
|
||||||
35
init.d/termencoding.in
Normal file
35
init.d/termencoding.in
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#!@PREFIX@/sbin/runscript
|
||||||
|
# Copyright 2008 Roy Marples <roy@marples.name>
|
||||||
|
# All rights reserved. Released under the 2-clause BSD license.
|
||||||
|
|
||||||
|
description="Configures terminal encoding."
|
||||||
|
|
||||||
|
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
|
||||||
|
unicode=${unicode:-${UNICODE}}
|
||||||
|
|
||||||
|
depend()
|
||||||
|
{
|
||||||
|
keyword noopenvz noprefix nouml novserver noxenu
|
||||||
|
}
|
||||||
|
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
local ttydev=/dev/tty n=
|
||||||
|
[ -d /dev/vc ] && ttydev=/dev/vc/
|
||||||
|
|
||||||
|
# Set terminal encoding to either ASCII or UNICODE.
|
||||||
|
# See utf-8(7) for more information.
|
||||||
|
local termencoding="%@" termmsg="ASCII"
|
||||||
|
if yesno ${unicode}; then
|
||||||
|
termencoding="%G"
|
||||||
|
termmsg="UTF-8"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ebegin "Setting terminal encoding [${termmsg}]"
|
||||||
|
n=1
|
||||||
|
while [ ${n} -le "${ttyn}" ]; do
|
||||||
|
printf "\033%s" "${termencoding}" >"${ttydev}${n}"
|
||||||
|
n=$((${n} + 1))
|
||||||
|
done
|
||||||
|
eend 0
|
||||||
|
}
|
||||||
@@ -61,15 +61,15 @@ start()
|
|||||||
mapfile)
|
mapfile)
|
||||||
local entry=
|
local entry=
|
||||||
while read entry; do
|
while read entry; do
|
||||||
case "${entry}" in
|
case "${entry}" in
|
||||||
\#*|"")
|
\#*|"")
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
cmd="${wsctl} -w \"map+=${entry}\""
|
cmd="${wsctl} -w \"map+=${entry}\""
|
||||||
eval "${cmd} >/dev/null"
|
eval "${cmd} >/dev/null"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done < "${arg1}"
|
done < "${arg1}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
17
man/Makefile
17
man/Makefile
@@ -1,7 +1,8 @@
|
|||||||
MAN3= einfo.3 \
|
MAN3= einfo.3 \
|
||||||
rc_config.3 rc_deptree.3 rc_find_pids.3 rc_plugin_hook.3 \
|
rc_config.3 rc_deptree.3 rc_find_pids.3 rc_plugin_hook.3 \
|
||||||
rc_runlevel.3 rc_service.3 rc_strcatpaths.3 rc_strlist.3
|
rc_runlevel.3 rc_service.3 rc_stringlist.3
|
||||||
MAN8= rc-status.8 rc-update.8 rc.8 runscript.8 start-stop-daemon.8
|
MAN8= rc-service.8 rc-status.8 rc-update.8 rc.8 runscript.8 \
|
||||||
|
start-stop-daemon.8
|
||||||
|
|
||||||
# Handy macro to create symlinks
|
# Handy macro to create symlinks
|
||||||
# This does rely on correctly formatting our manpages!
|
# This does rely on correctly formatting our manpages!
|
||||||
@@ -11,7 +12,7 @@ MAKE_LINKS= suffix=$${man\#*.}; \
|
|||||||
-n -e '/^\.Sh NAME$$/,/\.Sh/ s/\.Nm //p' $${man}`; do \
|
-n -e '/^\.Sh NAME$$/,/\.Sh/ s/\.Nm //p' $${man}`; do \
|
||||||
if test "$${link}" != "$${prefix}" ; then \
|
if test "$${link}" != "$${prefix}" ; then \
|
||||||
ln -sf $${man} \
|
ln -sf $${man} \
|
||||||
${DESTDIR}/${MANDIR}$${suffix}/$${link}.$${suffix} ; \
|
${DESTDIR}/${MANDIR}/man$${suffix}/$${link}.$${suffix} ; \
|
||||||
fi; \
|
fi; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
@@ -22,15 +23,17 @@ include ${MK}/gitignore.mk
|
|||||||
all:
|
all:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
${INSTALL} -d ${DESTDIR}/${MANDIR}3
|
${INSTALL} -d ${DESTDIR}/${MANDIR}/man3
|
||||||
for man in ${MAN3}; do \
|
for man in ${MAN3}; do \
|
||||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}3 || exit $$?; \
|
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}/man3 || exit $$?; \
|
||||||
${MAKE_LINKS} \
|
${MAKE_LINKS} \
|
||||||
done
|
done
|
||||||
${INSTALL} -d ${DESTDIR}/${MANDIR}8
|
${INSTALL} -d ${DESTDIR}/${MANDIR}/man8
|
||||||
for man in ${MAN8}; do \
|
for man in ${MAN8}; do \
|
||||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}8 || exit $$?; \
|
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}/man8 || exit $$?; \
|
||||||
${MAKE_LINKS} \
|
${MAKE_LINKS} \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
check test::
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd Feb 22, 2008
|
.Dd Mar 16, 2008
|
||||||
.Dt EINFO 3 SMM
|
.Dt EINFO 3 SMM
|
||||||
.Os OpenRC
|
.Os OpenRC
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@@ -62,7 +62,7 @@ Enhanced Informatation output library (libeinfo, -leinfo)
|
|||||||
.Ft int Fn ewend "int retval" "const char * restrict format" ...
|
.Ft int Fn ewend "int retval" "const char * restrict format" ...
|
||||||
.Ft int Fn eendv "int retval" "const char * restrict format" ...
|
.Ft int Fn eendv "int retval" "const char * restrict format" ...
|
||||||
.Ft int Fn ewendv "int retval" "const char * restrict format" ...
|
.Ft int Fn ewendv "int retval" "const char * restrict format" ...
|
||||||
.Ft void Fn ebracket "int col" "einfo_color_t color" "const char * restrict msg"
|
.Ft void Fn ebracket "int col" "ECOLOR color" "const char * restrict msg"
|
||||||
.Ft void Fn eindent void
|
.Ft void Fn eindent void
|
||||||
.Ft void Fn eoutdent void
|
.Ft void Fn eoutdent void
|
||||||
.Ft void Fn eindentv void
|
.Ft void Fn eindentv void
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user