Compare commits

..

132 Commits

Author SHA1 Message Date
Roy Marples
5ebe7f1349 Push out 0.2.1 to solve a few issues. 2008-04-02 16:35:28 +00:00
Roy Marples
6a227d0c45 Merge branch 'master' of git@git.overlays.gentoo.org:proj/openrc 2008-04-02 16:35:02 +00:00
Roy Marples
403abe73de Fix vlans, #49. 2008-04-01 21:34:31 +00:00
Roy Marples
be82e950d7 Merge branch 'master' of git@git.overlays.gentoo.org:proj/openrc 2008-03-31 16:31:43 +00:00
Roy Marples
3ca8387966 Document SSD_NICELEVEL. 2008-03-29 09:37:59 +00:00
Roy Marples
f5a9b42215 Restore noserver and noopenvz to sysctl. 2008-03-28 19:05:26 +00:00
Roy Marples
d370918f0c Merge branch 'master' of git@git.overlays.gentoo.org:proj/openrc 2008-03-28 16:21:59 +00:00
Roy Marples
e995404e3b Add XEN support to NetBSD. 2008-03-28 16:10:31 +00:00
Roy Marples
caa4704ce6 Merge branch 'master' of git@git.overlays.gentoo.org:proj/openrc 2008-03-28 16:05:11 +00:00
Roy Marples
17d28fde42 Support XEN on NetBSD 2008-03-28 16:04:48 +00:00
Roy Marples
b418f2e471 Allow our headers to be included by C++ programs easily. 2008-03-28 11:06:47 +00:00
Roy Marples
ee4e861796 Put some dir locations in rc.h so that 3rd party apps can become awware of them. 2008-03-28 10:46:12 +00:00
Roy Marples
11e33e81c8 Remove rc_service_start/stop from librc as they block and unmask signals. The application may not wish this behaviour and should fork/exec the service itself. 2008-03-28 08:42:05 +00:00
Roy Marples
5e8ed2aeca Tweak install of runlevels. 2008-03-27 19:55:03 +00:00
Roy Marples
742310744d We would sanitize $RC_LIBDIR/sbin as well. If it's really needed then rc-functions.sh will add it back. 2008-03-27 18:34:12 +00:00
Roy Marples
4e9b58b07d Sanitize the write rc dir. 2008-03-27 17:09:18 +00:00
Roy Marples
c564043f86 No need for the extra rc. 2008-03-27 16:59:33 +00:00
Roy Marples
b3d1182a2f Fix mulitlib issues. 2008-03-27 16:53:22 +00:00
Roy Marples
f6cb321f9f NetBSD doesn't work with this powerd. 2008-03-27 14:56:50 +00:00
Roy Marples
f85c6ca84c Make our messages similar 2008-03-27 14:03:37 +00:00
Roy Marples
d09f9f47eb Split terminal encoding out. 2008-03-27 13:49:49 +00:00
Roy Marples
b271ac5af5 Fix install of rc and rc.shutdown on the BSD's. 2008-03-27 09:33:20 +00:00
Roy Marples
fccff6a4ed Allow multiple ntp_servers without error, #47 2008-03-26 22:39:27 +00:00
Roy Marples
a1d555bdc4 Release 0.2 2008-03-26 19:58:43 +00:00
Roy Marples
ecba32d1ca Install ifwatchd for NetBSD. 2008-03-26 19:39:43 +00:00
Roy Marples
a718975e08 Add license blurb to a few files and append my email to my name. 2008-03-26 17:55:35 +00:00
Roy Marples
15d34d0a16 Add license blurb to a few files and append my email to my name. 2008-03-26 17:53:37 +00:00
Roy Marples
864e17fabc Ignore more files. 2008-03-26 17:34:23 +00:00
Roy Marples
cee3ccc4c1 Fix a segfault if rc.conf does not exist, Gentoo #214887 2008-03-26 15:10:26 +00:00
Roy Marples
f90f2914b9 Add mising net files back. 2008-03-26 14:41:47 +00:00
Roy Marples
ac834ddc56 Fix linux compile. 2008-03-26 14:39:13 +00:00
Roy Marples
8e71c03495 No more need for SUBOS 2008-03-26 14:29:27 +00:00
Roy Marples
833903fc78 use $CP and $SED instead of cp and sed 2008-03-26 14:27:46 +00:00
Roy Marples
ccf238f852 Merge net.OS into net 2008-03-26 14:18:01 +00:00
Roy Marples
55858eca2e .sh.BSD.in is a better extension. 2008-03-26 14:02:59 +00:00
Roy Marples
ac037241a7 Merge doc dirs. 2008-03-26 13:59:06 +00:00
Roy Marples
6af2b20297 Split sysctl into Linux and BSD specific files. 2008-03-26 09:36:34 +00:00
Roy Marples
1b40379a79 We should sort using LC_ALL=C to avoid locale issues. 2008-03-26 08:43:05 +00:00
Roy Marples
be1f9b0a93 Add --exists and --resolve to rc-service. 2008-03-26 08:08:47 +00:00
Roy Marples
e30ea10e6c Fix some more prefix stuff. 2008-03-26 05:08:56 +00:00
Roy Marples
3f37d4771b If we have coldplugged services, but no start_services, we need to create a new list for start_services. 2008-03-26 05:08:38 +00:00
Roy Marples
4f4b74e110 Check the right dir for installed scripts. 2008-03-26 04:48:39 +00:00
Roy Marples
f06e186d43 Fix mandir install. 2008-03-25 20:39:31 +00:00
Roy Marples
5866d829bb Try and fix more prefix stuff. 2008-03-25 18:33:45 +00:00
Roy Marples
068c90c82b Fix exclusive removal. 2008-03-25 18:20:23 +00:00
Roy Marples
59b27ad7eb Fix man install. 2008-03-25 17:37:54 +00:00
Roy Marples
85b480a6f2 Tweak man install. 2008-03-25 17:32:19 +00:00
Roy Marples
ae9ce04468 Allow MANPREFIX to work. 2008-03-25 17:24:54 +00:00
Roy Marples
c807b3a815 INITDIR should already be prefixed. 2008-03-25 17:19:41 +00:00
Roy Marples
4d6b84290a These now need to be prefixed. 2008-03-25 17:17:15 +00:00
Roy Marples
08791ec4a2 INITDIR should already be prefixed. 2008-03-25 17:11:44 +00:00
Roy Marples
a99b8d349c SYSCONFDIR should already be prefixed. 2008-03-25 17:09:56 +00:00
Roy Marples
74bff8a931 DIR should be prefixed already. 2008-03-25 16:59:26 +00:00
Roy Marples
a2a7f0740e Install swap-blk on NetBSD. 2008-03-25 16:40:49 +00:00
Roy Marples
9b2f7bce99 Fix FreeBSD makefile. 2008-03-25 16:25:12 +00:00
Roy Marples
3d0fc150dc Fix sysctl on Linux and BSD. 2008-03-25 14:35:52 +00:00
Roy Marples
fc7e6a3ada Fix module args per kernel version. 2008-03-25 14:35:36 +00:00
Roy Marples
748ddf28ed Include Os Makefile. 2008-03-25 14:15:54 +00:00
Roy Marples
55eb3794fb Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS. 2008-03-25 14:06:05 +00:00
Roy Marples
08aff6ef44 Allow per kernel version module arguments. 2008-03-25 08:31:48 +00:00
Roy Marples
0347f01345 Fix segfault when no coldplugged services, thanks to Daijo. 2008-03-24 13:30:24 +00:00
Roy Marples
5a80daaf43 Fix coldplug disabling. 2008-03-24 13:09:42 +00:00
Roy Marples
64332a3675 Add debug.mk 2008-03-24 11:52:01 +00:00
Roy Marples
821166fbfd Fix debug support to work without gmake and bundle -ggdb in properly. 2008-03-24 11:43:03 +00:00
Roy Marples
79719b5386 Fix adding services to the boot runlevel, #43 2008-03-24 10:13:49 +00:00
Mike Frysinger
486d517674 setup a bit of a test framework 2008-03-24 07:17:05 +00:00
Mike Frysinger
1c9c2f9fcf fixup testing 2008-03-24 06:30:21 +00:00
Mike Frysinger
7b08276fa8 add missing rc_stringlist_new/rc_sys hidden defs 2008-03-24 06:24:46 +00:00
Mike Frysinger
58caa0864f ignore generated files 2008-03-24 06:18:51 +00:00
Mike Frysinger
9ed5d28d15 add check/test rules 2008-03-24 06:10:40 +00:00
Mike Frysinger
02e7e1b988 dont leak the _e var 2008-03-24 05:54:18 +00:00
Roy Marples
a1b9768243 Fix returning a service descriptions. 2008-03-23 22:58:25 +00:00
Roy Marples
06635dedbc We don't change service here. 2008-03-23 22:57:56 +00:00
Roy Marples
2715981ff9 Revert commit 48fc097e39ec9b3edd9a8929fe9faf8f302451ec and add a comment about making it a runtime config option if it needs to change. 2008-03-23 20:04:18 +00:00
Roy Marples
ce644e1735 Report mounts in reverse order, Gentoo #214150. 2008-03-23 19:51:41 +00:00
Mike Frysinger
ec4721dd7f fix spacing in the trailing [ msg ] 2008-03-23 12:49:40 +00:00
Mike Frysinger
e1b09daaac fix broken whitespace -- no functional changes 2008-03-23 12:24:15 +00:00
Mike Frysinger
bd34df6361 add support for automatic gdb launching when RC_DEBUG is defined to 1 to ease bug reporting / information gathering 2008-03-22 23:02:30 +00:00
Mike Frysinger
7beafe361a ignore gdb files 2008-03-22 23:01:06 +00:00
Mike Frysinger
5dcdfcdf7a add local rpaths if in the git tree 2008-03-22 23:00:32 +00:00
Roy Marples
a4f9eb699b Fix some crashers in a prefix with few services. 2008-03-21 20:02:10 +00:00
Roy Marples
f7f3b6ae09 euid 0 should always be able to find pids too. 2008-03-21 17:41:01 +00:00
Roy Marples
f6b47568ad Merge branch 'master' of git@git.overlays.gentoo.org:proj/openrc 2008-03-21 13:04:57 +00:00
Roy Marples
85a6addd23 Only test crashed services if we can see pid 1. 2008-03-21 13:04:29 +00:00
Roy Marples
4079b4d65d Clean up error display. 2008-03-21 11:20:03 +00:00
Roy Marples
eca292e5d9 Some OS's block on umount -f, so don't use it. 2008-03-21 11:02:02 +00:00
Roy Marples
fe90a548b5 ksoftlevel -> krunlevel 2008-03-21 10:34:09 +00:00
Roy Marples
494fb0a5f6 Add --list to rc-service to list all available services. 2008-03-21 09:10:59 +00:00
Roy Marples
e505e6ea41 We should only free the buffer when done reading the dir. 2008-03-21 08:31:04 +00:00
Roy Marples
e47661449a More pathing fixes. 2008-03-21 00:30:22 +00:00
Roy Marples
04b0acb010 Fix pathing again. 2008-03-20 19:57:31 +00:00
Roy Marples
e598b7d2cd Tweak install. 2008-03-20 17:52:07 +00:00
Roy Marples
ec2d39d024 Just warn about the incorrect service. Let the right service be more explanitory about missing options. 2008-03-19 22:26:45 +00:00
Roy Marples
3b888b385a gitignore 2008-03-19 22:17:10 +00:00
Roy Marples
eea30772d4 Fix last commit. 2008-03-19 22:11:22 +00:00
Roy Marples
d948e65d60 Give a better error message when no service specified. 2008-03-19 20:04:48 +00:00
Roy Marples
97abd91577 Report wrong service correctly. 2008-03-19 20:01:48 +00:00
Roy Marples
5f091395c7 Typo. 2008-03-19 19:59:50 +00:00
Roy Marples
6159a32f39 SVCNAME -> RC_SVCNAME, but export SVCNAME still for compat. 2008-03-19 19:57:24 +00:00
Roy Marples
6d2e1f7add Fix building on Linux. 2008-03-19 19:43:08 +00:00
Roy Marples
d9ec62b22a Add rc-service and update all softlevel refs to runlevel. 2008-03-19 17:11:50 +00:00
Roy Marples
089caec283 Add missing .mks 2008-03-19 15:38:05 +00:00
Roy Marples
64853c4916 Rejig the build system a little so we have per ok defs per system. Probably easier in the long run. 2008-03-19 15:22:20 +00:00
Roy Marples
0e6eb0f764 Ensure that our path includes packages and local 2008-03-19 15:21:42 +00:00
Roy Marples
f69013adbe Fix define name 2008-03-19 15:15:09 +00:00
Roy Marples
1443fee901 Fix errors when reporting who we are scheduled by. 2008-03-19 12:26:47 +00:00
Roy Marples
cdd3881c1b Return scheduled services correctly. 2008-03-19 12:26:09 +00:00
Roy Marples
773d50dabb Get going_down and parallel the right away round. 2008-03-18 23:06:02 +00:00
Roy Marples
7b8215bbd3 Support pam_mktemp. 2008-03-18 08:19:29 +00:00
Roy Marples
51c825ceee Make rc_getline private and save it's buffer so it's sort of like getline from glibc. 2008-03-17 21:27:37 +00:00
Roy Marples
b9eb450696 Fix some tests on FreeBSD. 2008-03-17 17:57:07 +00:00
Roy Marples
c74cfabe2e init some vars. 2008-03-17 16:42:31 +00:00
Roy Marples
5d77c0db6b This should be a fixed buffer. 2008-03-17 14:42:10 +00:00
Roy Marples
b2f7606b23 We should check for NULL here. 2008-03-17 14:31:44 +00:00
Roy Marples
4c14666423 Punt the rc_strcatpaths function and use snprintf instead to save on expensive malloc calls. 2008-03-17 13:25:56 +00:00
Roy Marples
50a7697bf2 rc_find_pids now returns RC_PIDLIST instead of a NULL terminated array. 2008-03-17 09:59:52 +00:00
Roy Marples
40930d7d0a Use correct TAILQ_CONCAT macro when not defined. 2008-03-16 17:27:13 +00:00
Roy Marples
1fd1472dde Add new stringlist files. 2008-03-16 17:01:35 +00:00
Roy Marples
cb9da6a262 Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ from queue(3). Refactor code style around the BSD KNF. 2008-03-16 17:00:56 +00:00
Roy Marples
40e12f6ba0 RC_SERVICE now points to the service file, so daemons can recall us directly. 2008-03-11 15:00:16 +00:00
Roy Marples
568ec5f343 Don't state the fstype we're using as fstab could be totally different. 2008-03-11 13:55:39 +00:00
Roy Marples
6f68c44a77 mount may not be in /sbin 2008-03-11 13:51:06 +00:00
Roy Marples
b7c0d8b43c Remove debug LDFLAGS 2008-03-11 13:45:58 +00:00
Roy Marples
52a3cc162b Add a --mount command to fstabinfo so it can mount specific mount points, as mount can get confused with binded mounts, bug #36. 2008-03-11 13:39:20 +00:00
Roy Marples
0fa512c2b5 Coldplug net devices on the BSD's as found by getifaddrs. 2008-03-11 11:03:34 +00:00
Roy Marples
656b79b51e Fix getting MAC address on NetBSD. 2008-03-11 00:04:49 +00:00
Roy Marples
8b23aaecff Add ifwatchd.sh to power the NetBSD ifwatchd program. Let wpa_supplicant work with it. 2008-03-10 21:34:46 +00:00
Roy Marples
f20099bc33 Fix the old RC_USE names. 2008-03-10 11:33:39 +00:00
Roy Marples
a276050a54 Use correct shell_var function, Gentoo bug #212877 2008-03-10 08:56:28 +00:00
Roy Marples
c4a54605e0 Support baselayout-2 uppercase RC_NEED vars, #38. 2008-03-08 15:22:29 +00:00
Roy Marples
df1377601b We don't mount /lib/rc/init.d when / is rw at boot. 2008-03-08 15:18:53 +00:00
Roy Marples
4742e1ec69 d_type is not portable across filesystems. 2008-03-08 13:06:29 +00:00
233 changed files with 6605 additions and 6457 deletions

2
.gitignore vendored
View File

@@ -1 +1,3 @@
openrc-0.1.tar.bz2
.gdb_history
.gdbinit

View File

@@ -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

View File

@@ -1,5 +0,0 @@
DIR= ${CONFDIR}
CONF= localmount moused powerd rarpd
MK= ../mk
include ${MK}/scripts.mk

View File

@@ -1,5 +0,0 @@
DIR= ${CONFDIR}
CONF= syscons
MK= ../mk
include ${MK}/scripts.mk

View File

@@ -1,6 +0,0 @@
DIR= ${CONFDIR}
CONF= consolefont keymaps modules
CONF_APPEND= clock
MK= ../mk
include ${MK}/scripts.mk

View File

@@ -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=""

View File

@@ -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
View File

@@ -0,0 +1 @@
CONF+= moused powerd rarpd savecore syscons

1
conf.d/Makefile.Linux Normal file
View File

@@ -0,0 +1 @@
CONF+= consolefont hwclock keymaps modules

1
conf.d/Makefile.NetBSD Normal file
View File

@@ -0,0 +1 @@
CONF+= moused rarpd savecore

14
conf.d/hwclock Normal file
View 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=""

View File

@@ -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.

View File

@@ -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

View File

@@ -1,5 +0,0 @@
DIR= ${DOCDIR}/openrc
INC= net.example
MK= ../mk
include ${MK}/scripts.mk

1
doc/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
net.example

View File

@@ -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
View File

@@ -0,0 +1,5 @@
SRCS+= net.example.in
.SUFFIXES: .BSD.in
.BSD.in:
${CP} $< $@

5
doc/Makefile.Linux Normal file
View File

@@ -0,0 +1,5 @@
SRCS+= net.example.in
.SUFFIXES: .Linux.in
.Linux.in:
${CP} $< $@

5
doc/Makefile.NetBSD Normal file
View File

@@ -0,0 +1,5 @@
SRCS+= net.example.in
.SUFFIXES: .BSD.in
.BSD.in:
${CP} $< $@

View File

@@ -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}:' $< > $@

View File

@@ -1 +0,0 @@
DEFTERM= cons25

View File

@@ -1 +0,0 @@
DEFTERM= wsvt25

View File

@@ -1,6 +0,0 @@
DIR= /etc
CONF= devd.conf
BIN= rc.devd
MK= ../mk
include ${MK}/scripts.mk

View File

@@ -1,5 +0,0 @@
DIR= ${SYSCONFDIR}
CONF_APPEND= rc.conf
MK= ../mk
include ${MK}/scripts.mk

View File

@@ -1,2 +1,3 @@
rc.conf
rc
rc.shutdown

View File

@@ -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
View 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
View 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
View 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
View File

@@ -1,10 +0,0 @@
hostid
moused
newsyslog
pf
rarpd
rc-enabled
rpcbind
savecore
sysctl
syslogd

View File

@@ -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

View File

@@ -1,8 +0,0 @@
clock
devd
dumpon
ipfw
mixer
nscd
powerd
syscons

View File

@@ -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

View File

@@ -1,8 +0,0 @@
clock
consolefont
keymaps
modules
mtab
numlock
procfs
sysctl

View File

@@ -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

View File

@@ -1,3 +0,0 @@
swap-blk
ttys
wscons

View File

@@ -1,6 +0,0 @@
DIR= ${INITDIR}
SRCS= swap-blk.in ttys.in wscons.in
BIN= ${OBJS}
MK= ../mk
include ${MK}/scripts.mk

View File

@@ -15,5 +15,5 @@ depend()
start_pre()
{
mkdir -p $(dirname $pidfile)
mkdir -p $(dirname $pidfile)
}

View File

@@ -18,7 +18,7 @@ depend()
reload()
{
ebegin "Reloading ${SVCNAME}"
ebegin "Reloading ${RC_SVCNAME}"
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
eend $?
}

View File

@@ -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"

View File

@@ -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
View File

@@ -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

View File

@@ -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
View 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
View 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
View 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} $< > $@

View File

@@ -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

View File

@@ -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

View File

@@ -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}

View File

@@ -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
}

View File

@@ -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

View File

@@ -23,6 +23,7 @@ fi
depend()
{
provide clock
if yesno ${clock_adjfile}; then
use root
else

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 $?
}

View File

@@ -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
View 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
}

View File

@@ -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}"
;;

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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