Compare commits
132 Commits
openrc-0.1
...
openrc-0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
||||
.gdb_history
|
||||
.gdbinit
|
||||
|
||||
6
Makefile
6
Makefile
@@ -1,9 +1,9 @@
|
||||
# OpenRC Makefile
|
||||
# Copyright 2007-2008 Roy Marples
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
||||
# All rights reserved. Released under the 2-clause BSD license.
|
||||
|
||||
NAME= openrc
|
||||
VERSION= 0.1
|
||||
VERSION= 0.2.1
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
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}
|
||||
CONF= bootmisc clock fsck hostname local net urandom
|
||||
CONF= bootmisc fsck hostname local net urandom
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/os.mk
|
||||
include Makefile.${OS}
|
||||
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="ohci1394"
|
||||
|
||||
# Give the modules some arguments if needed.
|
||||
# module_ieee1394_args="debug"
|
||||
# Give the modules some arguments if needed, per version if necessary.
|
||||
#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
|
||||
# for a list of modules and their options.
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/os.mk
|
||||
include Makefile.${OS}
|
||||
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} $< $@
|
||||
@@ -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.shutdown
|
||||
@@ -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 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
|
||||
@@ -15,5 +15,5 @@ depend()
|
||||
|
||||
start_pre()
|
||||
{
|
||||
mkdir -p $(dirname $pidfile)
|
||||
mkdir -p $(dirname $pidfile)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ depend()
|
||||
|
||||
reload()
|
||||
{
|
||||
ebegin "Reloading ${SVCNAME}"
|
||||
ebegin "Reloading ${RC_SVCNAME}"
|
||||
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ start_pre()
|
||||
# Copy local timezone information if it is not up to date.
|
||||
if [ -r /etc/localtime ]; then
|
||||
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
|
||||
|
||||
command_args="${command_args} -t ${named_chroot}"
|
||||
@@ -72,7 +72,7 @@ start_pre()
|
||||
|
||||
if [ ! -s "${named_chroot}${namedb}/rndc.conf" ]; then
|
||||
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
|
||||
local getuser="stat -f%Su"
|
||||
[ "${RC_UNAME}" = "Linux" ] && getuser="stat -c%U"
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
||||
# All rights reserved. Released under the 2-clause BSD license.
|
||||
|
||||
vpn=${SVCNAME#*.}
|
||||
vpn=${RC_SVCNAME#*.}
|
||||
name="OpenVPN"
|
||||
[ "${vpn}" != "openvpn" ] && name="${name} (${vpn})"
|
||||
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_config=${openvpn_config:-${openvpn_dir}/${vpn}.conf}
|
||||
command_args="${openvpn_args} --daemon --config ${openvpn_config} --writepid ${pidfile}"
|
||||
|
||||
18
init.d/.gitignore
vendored
18
init.d/.gitignore
vendored
@@ -7,4 +7,22 @@ localmount
|
||||
netmount
|
||||
root
|
||||
swap
|
||||
sysctl
|
||||
urandom
|
||||
hostid
|
||||
moused
|
||||
newsyslog
|
||||
pf
|
||||
rarpd
|
||||
rc-enabled
|
||||
rpcbind
|
||||
savecore
|
||||
syslogd
|
||||
adjkerntz
|
||||
devd
|
||||
dumpon
|
||||
ipfw
|
||||
mixer
|
||||
nscd
|
||||
powerd
|
||||
syscons
|
||||
|
||||
@@ -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
|
||||
|
||||
11
init.d/Makefile.FreeBSD
Normal file
11
init.d/Makefile.FreeBSD
Normal file
@@ -0,0 +1,11 @@
|
||||
# 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} $< > $@
|
||||
6
init.d/Makefile.Linux
Normal file
6
init.d/Makefile.Linux
Normal file
@@ -0,0 +1,6 @@
|
||||
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} $< > $@
|
||||
10
init.d/Makefile.NetBSD
Normal file
10
init.d/Makefile.NetBSD
Normal file
@@ -0,0 +1,10 @@
|
||||
# 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()
|
||||
{
|
||||
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
|
||||
@@ -46,7 +47,7 @@ save()
|
||||
|
||||
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
|
||||
[ -z "${CDBOOT}" ] && save
|
||||
fi
|
||||
@@ -31,18 +31,20 @@ cleanup_tmp_dir()
|
||||
rm -rf -- [b-ikm-pr-zA-Z0-9\.]*
|
||||
|
||||
find ${startopts} ! -name . \
|
||||
! -path ./lost+found \
|
||||
! -path "./lost+found" \
|
||||
! -path "./lost+found/*" \
|
||||
! -path ./quota.user \
|
||||
! -path "./quota.user" \
|
||||
! -path "./quota.user/*" \
|
||||
! -path ./aquota.user \
|
||||
! -path "./aquota.user" \
|
||||
! -path "./aquota.user/*" \
|
||||
! -path ./quota.group \
|
||||
! -path "./quota.group" \
|
||||
! -path "./quota.group/*" \
|
||||
! -path ./aquota.group \
|
||||
! -path "./aquota.group" \
|
||||
! -path "./aquota.group/*" \
|
||||
! -path ./journal \
|
||||
! -path "./journal" \
|
||||
! -path "./journal/*" \
|
||||
! -path "./.private" \
|
||||
! -path "./.private/*" \
|
||||
${delete} \
|
||||
-type d -prune
|
||||
eend 0
|
||||
@@ -124,7 +126,7 @@ start()
|
||||
stop()
|
||||
{
|
||||
# Write a halt record if we're shutting down
|
||||
case "${RC_SOFTLEVEL}" in
|
||||
case "${RC_RUNLEVEL}" in
|
||||
reboot|shutdown) [ "${RC_UNAME}" = "Linux" ] && halt -w;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ description="Sets a font for the consoles."
|
||||
|
||||
depend()
|
||||
{
|
||||
need localmount
|
||||
need keymaps # sets up terminal encoding scheme
|
||||
need localmount termencoding
|
||||
after hotplug
|
||||
keyword noopenvz noprefix nouml novserver noxenu
|
||||
}
|
||||
@@ -34,7 +33,7 @@ start()
|
||||
return 0
|
||||
fi
|
||||
|
||||
local x= param= sf_param= retval=0 ttydev=
|
||||
local x= param= sf_param= retval=0 ttydev=/dev/tty
|
||||
|
||||
# Get additional parameters
|
||||
if [ -n "${consoletranslation}" ]; then
|
||||
@@ -45,11 +44,8 @@ start()
|
||||
fi
|
||||
|
||||
# Set the console font
|
||||
ebegin "Setting user font"
|
||||
[ -d /dev/vc ] \
|
||||
&& ttydev=/dev/vc/ \
|
||||
|| ttydev=/dev/tty
|
||||
|
||||
ebegin "Setting console font [${consolefont}]"
|
||||
[ -d /dev/vc ] && ttydev=/dev/vc/
|
||||
x=1
|
||||
while [ ${x} -le ${ttyn} ]; do
|
||||
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
|
||||
if [ ${retval} -eq 0 -a -w "${RC_LIBDIR}" ]; then
|
||||
mkdir -p "${RC_LIBDIR}"/console
|
||||
|
||||
for font in /usr/share/consolefonts/"${consolefont}".*; do
|
||||
:
|
||||
done
|
||||
done
|
||||
cp "${font}" "${RC_LIBDIR}"/console
|
||||
echo "${font##*/}" > "${RC_LIBDIR}"/console/font
|
||||
if yesno ${unicode:-${UNICODE}}; then
|
||||
cp /dev/null "${RC_LIBDIR}"/console/unicode
|
||||
echo "" > "${RC_LIBDIR}"/console/unicode
|
||||
else
|
||||
rm -f "${RC_LIBDIR}"/console/unicode
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
return ${retval}
|
||||
@@ -14,9 +14,9 @@ depend() {
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
sysctl hw.bus.devctl_disable=0 >/dev/null
|
||||
sysctl hw.bus.devctl_disable=0 >/dev/null
|
||||
}
|
||||
|
||||
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
|
||||
_reboot() {
|
||||
if [ "${RC_SOFTLEVEL}" = "${RC_BOOTLEVEL}" ]; then
|
||||
if [ "${RC_RUNLEVEL}" = "${RC_BOOTLEVEL}" ]; then
|
||||
reboot "$@"
|
||||
_abort || return 1
|
||||
fi
|
||||
|
||||
@@ -23,6 +23,7 @@ fi
|
||||
|
||||
depend()
|
||||
{
|
||||
provide clock
|
||||
if yesno ${clock_adjfile}; then
|
||||
use root
|
||||
else
|
||||
@@ -87,7 +87,7 @@ start() {
|
||||
# Only IPs and nets in firewall_allowservices is allowed in.
|
||||
for i in ${ipfw_ip_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
|
||||
|
||||
@@ -14,7 +14,7 @@ dumpkeys_charset=${dumpkeys_charset:-${DUMPKEYS_CHARSET}}
|
||||
|
||||
depend()
|
||||
{
|
||||
need localmount
|
||||
need localmount termencoding
|
||||
keyword noopenvz noprefix nouml novserver noxenu
|
||||
}
|
||||
|
||||
@@ -25,43 +25,41 @@ start()
|
||||
return 1
|
||||
fi
|
||||
|
||||
local ttydev= n=
|
||||
[ -d /dev/vc ] \
|
||||
&& ttydev=/dev/vc/ \
|
||||
|| ttydev=/dev/tty
|
||||
local ttydev=/dev/tty n=
|
||||
[ -d /dev/vc ] && ttydev=/dev/vc/
|
||||
|
||||
# Force linux keycodes for PPC.
|
||||
if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]; then
|
||||
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
|
||||
fi
|
||||
|
||||
ebegin "Loading key mappings"
|
||||
local loadkeys_uni= wkeys=
|
||||
yesno ${unicode} && loadkeys_uni="--unicode"
|
||||
ebegin "Loading key mappings [${keymap}]"
|
||||
local loadkeys_uni= wkeys= kmode="-a" msg="ASCII"
|
||||
if yesno ${unicode}; then
|
||||
loadkeys_uni="--unicode"
|
||||
kmode="-u"
|
||||
msg="UTF-8"
|
||||
fi
|
||||
yesno ${windowskeys} && wkeys="windowkeys"
|
||||
loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
|
||||
eend $? "Error loading key mappings" || return $?
|
||||
|
||||
if yesno ${fix_euro}; then
|
||||
ebegin "Fixing font for euro symbol"
|
||||
# Fix some fonts displaying the Euro, #173528.
|
||||
echo "altgr keycode 18 = U+20AC" | loadkeys -q
|
||||
eend $?
|
||||
fi
|
||||
|
||||
# Set terminal encoding to either ASCII or UNICODE.
|
||||
# See utf-8(7) for more information.
|
||||
local termencoding="%@" termmsg="ASCII" kmode="-a"
|
||||
ebegin "Setting keyboard mode [${msg}]"
|
||||
if yesno ${unicode}; then
|
||||
dumpkeys ${dumpkeys_charset:+-c} \
|
||||
${dumpkeys_charset} | loadkeys --unicode
|
||||
termencoding="%G"
|
||||
termmsg="UTF-8"
|
||||
kmode="-u"
|
||||
fi
|
||||
|
||||
ebegin "Setting terminal encoding to" ${termmsg}
|
||||
n=1
|
||||
while [ ${n} -le "${ttyn}" ]; do
|
||||
printf "\033%s" "${termencoding}" >"${ttydev}${n}"
|
||||
kbd_mode "${kmode}" -C "${ttydev}${n}"
|
||||
n=$((${n} + 1))
|
||||
done
|
||||
@@ -23,7 +23,7 @@ start()
|
||||
x=${KV#*.*.}
|
||||
local KV_MICRO=${x%%-*}
|
||||
|
||||
local list= x= args= cnt=0
|
||||
local list= x= xx= y= args= cnt=0
|
||||
for x in "${KV}" \
|
||||
${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} \
|
||||
${KV_MAJOR}.${KV_MINOR} \
|
||||
@@ -35,7 +35,15 @@ start()
|
||||
|
||||
for x in ${list}; do
|
||||
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}"
|
||||
eend $? "Failed to load ${x}" && cnt=$((${cnt} + 1))
|
||||
done
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
||||
# All rights reserved. Released under the 2-clause BSD license.
|
||||
|
||||
mouse=${SVCNAME##*.}
|
||||
mouse=${RC_SVCNAME##*.}
|
||||
if [ -n "${name}" -a "${mouse}" != "moused" ]; then
|
||||
moused_device=/dev/"${mouse}"
|
||||
pidfile=/var/run/moused-"${mouse}".pid
|
||||
@@ -46,14 +46,14 @@ start()
|
||||
for x in ${net_fs_list}; do
|
||||
case "${x}" in
|
||||
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
|
||||
# them twice
|
||||
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
|
||||
# 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
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -24,9 +24,7 @@ start()
|
||||
done
|
||||
|
||||
# If we have an init script for this service, continue
|
||||
[ -x @SYSCONFDIR@/init.d/"${service}" ] && continue
|
||||
[ -x @PKG_PREFIX@/@SYSCONFDIR@/init.d/"${service}" ] && continue
|
||||
[ -x @LOCAL_PREFIX@/@SYSCONFDIR@/init.d/"${service}" ] && continue
|
||||
rc-service --exists "${service}" && continue
|
||||
|
||||
# Ensure that the users rc.conf will start us - ignore the defaults
|
||||
eval enabled=\$${svc##*/}_enable
|
||||
@@ -12,9 +12,8 @@ depend()
|
||||
start()
|
||||
{
|
||||
[ -e /etc/sysctl.conf ] || return 0
|
||||
|
||||
ebegin "Configuring kernel parameters"
|
||||
local retval=0 var= comments=
|
||||
ebegin "Configuring kernel parameters"
|
||||
while read var comments; do
|
||||
case "${var}" in
|
||||
""|"#"*) continue;;
|
||||
@@ -22,5 +21,4 @@ start()
|
||||
sysctl -w "${var}" >/dev/null || retval=1
|
||||
done < /etc/sysctl.conf
|
||||
eend ${retval} "Some errors were encountered"
|
||||
eend $?
|
||||
}
|
||||
@@ -13,6 +13,6 @@ start()
|
||||
{
|
||||
[ -e /etc/sysctl.conf ] || return 0
|
||||
ebegin "Configuring kernel parameters"
|
||||
sysctl -p /etc/sysctl.conf >/dev/null
|
||||
eend $?
|
||||
sysctl -p >/dev/null
|
||||
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)
|
||||
local entry=
|
||||
while read entry; do
|
||||
case "${entry}" in
|
||||
case "${entry}" in
|
||||
\#*|"")
|
||||
continue
|
||||
;;
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
cmd="${wsctl} -w \"map+=${entry}\""
|
||||
eval "${cmd} >/dev/null"
|
||||
;;
|
||||
esac
|
||||
cmd="${wsctl} -w \"map+=${entry}\""
|
||||
eval "${cmd} >/dev/null"
|
||||
;;
|
||||
esac
|
||||
done < "${arg1}"
|
||||
;;
|
||||
|
||||
17
man/Makefile
17
man/Makefile
@@ -1,7 +1,8 @@
|
||||
MAN3= einfo.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
|
||||
MAN8= rc-status.8 rc-update.8 rc.8 runscript.8 start-stop-daemon.8
|
||||
rc_runlevel.3 rc_service.3 rc_stringlist.3
|
||||
MAN8= rc-service.8 rc-status.8 rc-update.8 rc.8 runscript.8 \
|
||||
start-stop-daemon.8
|
||||
|
||||
# Handy macro to create symlinks
|
||||
# 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 \
|
||||
if test "$${link}" != "$${prefix}" ; then \
|
||||
ln -sf $${man} \
|
||||
${DESTDIR}/${MANDIR}$${suffix}/$${link}.$${suffix} ; \
|
||||
${DESTDIR}/${MANDIR}/man$${suffix}/$${link}.$${suffix} ; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
@@ -22,15 +23,17 @@ include ${MK}/gitignore.mk
|
||||
all:
|
||||
|
||||
install:
|
||||
${INSTALL} -d ${DESTDIR}/${MANDIR}3
|
||||
${INSTALL} -d ${DESTDIR}/${MANDIR}/man3
|
||||
for man in ${MAN3}; do \
|
||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}3 || exit $$?; \
|
||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}/man3 || exit $$?; \
|
||||
${MAKE_LINKS} \
|
||||
done
|
||||
${INSTALL} -d ${DESTDIR}/${MANDIR}8
|
||||
${INSTALL} -d ${DESTDIR}/${MANDIR}/man8
|
||||
for man in ${MAN8}; do \
|
||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}8 || exit $$?; \
|
||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}/man8 || exit $$?; \
|
||||
${MAKE_LINKS} \
|
||||
done
|
||||
|
||||
check test::
|
||||
|
||||
clean:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd Feb 22, 2008
|
||||
.Dd Mar 16, 2008
|
||||
.Dt EINFO 3 SMM
|
||||
.Os OpenRC
|
||||
.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 eendv "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 eoutdent void
|
||||
.Ft void Fn eindentv void
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright 2007-2008 Roy Marples
|
||||
.\" Copyright 2008 Roy Marples
|
||||
.\" All rights reserved
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
@@ -22,24 +22,43 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd Feb 22, 2008
|
||||
.Dt RC_STRCATPATHS 3 SMM
|
||||
.Dd Mar 26, 2008
|
||||
.Dt RC-SERVICE 8 SMM
|
||||
.Os OpenRC
|
||||
.Sh NAME
|
||||
.Nm rc_strcatpaths
|
||||
.Nd concatenates each elements, seperating each with / as necessary
|
||||
.Sh LIBRARY
|
||||
Run Command library (librc, -lrc)
|
||||
.Nm rc-service
|
||||
.Nd locate and run an OpenRC service with the given arguments
|
||||
.Sh SYNOPSIS
|
||||
.In rc.h
|
||||
.Ft "char *" Fn rc_strcatpaths "const char *path" ...
|
||||
.Nm
|
||||
.Ar service cmd
|
||||
.Op Ar ...
|
||||
.Nm
|
||||
.Fl l , -list
|
||||
.Nm
|
||||
.Fl e , -exists
|
||||
.Ar service
|
||||
.Nm
|
||||
.Fl r , -resolve
|
||||
.Ar service
|
||||
.Sh DESCRIPTION
|
||||
.Fn rc_strcatpaths concatenates each
|
||||
.Fa path ,
|
||||
seperating each with / as necessary and returns a malloced pointer
|
||||
to the result. This should be freed when done.
|
||||
Service scripts could be in different places on different systems.
|
||||
.Nm
|
||||
locates the specified service and runs it with the given arguments.
|
||||
.Pp
|
||||
If given the
|
||||
.Fl l , -list
|
||||
argument then
|
||||
.Nm
|
||||
will list all available services.
|
||||
.Pp
|
||||
.Fl -e , exists
|
||||
return 0 if it can find
|
||||
.Ar service ,
|
||||
otherwise -1.
|
||||
.Fl -r , resolve
|
||||
does the same and also prints the full path of the service to stdout.
|
||||
.Sh SEE ALSO
|
||||
.Xr free 3 ,
|
||||
.Xr malloc 3
|
||||
.Xr rc 8 ,
|
||||
.Xr stdout 3
|
||||
.Sh AUTHORS
|
||||
.An "Roy Marples" Aq roy@marples.name
|
||||
2
man/rc.8
2
man/rc.8
@@ -50,7 +50,7 @@ and optionally
|
||||
.Pa /sys
|
||||
for Linux based systems. It also mounts
|
||||
.Pa /lib/rc/init.d
|
||||
as a ramdisk using tmpfs where available.
|
||||
as a ramdisk using tmpfs where available unless / is mounted rw at boot.
|
||||
.Nm
|
||||
uses
|
||||
.Pa /lib/rc/init.d
|
||||
|
||||
@@ -22,32 +22,23 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd Jan 08, 2008
|
||||
.Dd Mar 17, 2008
|
||||
.Dt RC_CONFIG 3 SMM
|
||||
.Os OpenRC
|
||||
.Sh NAME
|
||||
.Nm rc_getline , rc_config_list , rc_config_load , rc_config_value , rc_yesno
|
||||
.Nm rc_config_list , rc_config_load , rc_config_value , rc_yesno
|
||||
.Nd functions to query OpenRC service configurations
|
||||
.Sh LIBRARY
|
||||
Run Command library (librc, -lrc)
|
||||
.Sh SYNOPSIS
|
||||
.In rc.h
|
||||
.Ft "char *" Fn rc_getline "FILE *fp"
|
||||
.Ft "char **" Fn rc_config_list "const char *file"
|
||||
.Ft "char **" Fn rc_config_load "const char *file"
|
||||
.Ft "RC_STRINGLIST *" Fn rc_config_list "const char *file"
|
||||
.Ft "RC_STRINGLIST *" Fn rc_config_load "const char *file"
|
||||
.Ft "char *" Fn rc_config_value "const char *const *list" "const char *entry"
|
||||
.Ft bool Fn rc_yesno "const char *value"
|
||||
.Sh DESCRIPTION
|
||||
These functions provide an easy means of querying OpenRC configuration files.
|
||||
.Pp
|
||||
.Fn rc_getline
|
||||
expands it's buffer using
|
||||
.Fn malloc
|
||||
until it has read a whole line from the file or EOF.
|
||||
Trailing newlines are removed and the buffer is returned. Any functions that
|
||||
read from files should use this function to avoid any potential overflows and
|
||||
to ensure that arbitary long lines are read.
|
||||
.Pp
|
||||
.Fn rc_config_list
|
||||
returns a list of non comment lines in
|
||||
.Fa file .
|
||||
@@ -61,7 +52,7 @@ found in
|
||||
.Fa list .
|
||||
.Pp
|
||||
Each list should be freed using
|
||||
.Fn rc_strlist_free
|
||||
.Fn rc_stringlist_free
|
||||
when done.
|
||||
.Pp
|
||||
.Fn rc_yesno
|
||||
@@ -76,7 +67,7 @@ is set to
|
||||
.Va EINVAL .
|
||||
.Sh SEE ALSO
|
||||
.Xr malloc 3 ,
|
||||
.Xr rc_strlist_free 3 ,
|
||||
.Xr rc_stringlist_free 3 ,
|
||||
.Xr sh 1
|
||||
.Sh AUTHORS
|
||||
.An "Roy Marples" Aq roy@marples.name
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd Feb 22, 2008
|
||||
.Dd Mar 16, 2008
|
||||
.Dt RC_DEPTREE 3 SMM
|
||||
.Os OpenRC
|
||||
.Sh NAME
|
||||
@@ -36,25 +36,25 @@ Run Command library (librc, -lrc)
|
||||
.In rc.h
|
||||
.Ft bool Fn rc_deptree_update void
|
||||
.Ft bool Fn rc_deptree_update_needed void
|
||||
.Ft rc_depinfo_t Fn rc_deptree_load void
|
||||
.Ft "char **" Fo rc_deptree_depend
|
||||
.Fa "const rc_depinfo_t *deptree"
|
||||
.Ft RC_DEPTREE Fn rc_deptree_load void
|
||||
.Ft "RC_STRINGLIST *" Fo rc_deptree_depend
|
||||
.Fa "const RC_DEPTREE *deptree"
|
||||
.Fa "const char *type"
|
||||
.Fa "const char *service"
|
||||
.Fc
|
||||
.Ft bool Fo rc_deptree_depends
|
||||
.Fa "const rc_depinfo_t *deptree"
|
||||
.Fa "const RC_DEPTREE *deptree"
|
||||
.Fa "const char *const *types"
|
||||
.Fa "const char *const *services"
|
||||
.Fa "const char *runlevel"
|
||||
.Fa "int options"
|
||||
.Fc
|
||||
.Ft "char **" Fo rc_deptree_order
|
||||
.Fa "const rc_depinfo_t *deptree"
|
||||
.Ft "RC_STRINGLIST *" Fo rc_deptree_order
|
||||
.Fa "const RC_DEPTREE *deptree"
|
||||
.Fa "const char *runlevel"
|
||||
.Fa "int options"
|
||||
.Fc
|
||||
.Ft void Fn rc_deptree_free "rc_depinfo_t *deptree"
|
||||
.Ft void Fn rc_deptree_free "RC_DEPTREE *deptree"
|
||||
.Sh DESCRIPTION
|
||||
These functions provide a means of querying the dependencies of OpenRC
|
||||
services.
|
||||
@@ -100,15 +100,14 @@ only lists services actually needed or in the
|
||||
.Va runlevel .
|
||||
.Sh IMPLEMENTATION NOTES
|
||||
Each function that returns
|
||||
.Fr "char **"
|
||||
returns a malloced NULL terminated array of malloced NULL terminated strings,
|
||||
all of which need to be freed using
|
||||
.Fn rc_strlist_free
|
||||
.Fr "RC_STRINGLIST *"
|
||||
should be freed by calling
|
||||
.Fn rc_stringlist_free
|
||||
when done.
|
||||
.Sh SEE ALSO
|
||||
.Xr malloc 3 ,
|
||||
.Xr free 3 ,
|
||||
.Xr rc_strlist_free 3 ,
|
||||
.Xr rc_stringlist_free 3 ,
|
||||
.Xr runscript 8
|
||||
.Sh AUTHORS
|
||||
.An "Roy Marples" Aq roy@marples.name
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user