1 |
commit: cc9c23c8484ea7d07b1f8e54bcab46cc31ec727d |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Dec 9 18:38:10 2015 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 9 18:38:10 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=cc9c23c8 |
7 |
|
8 |
Complete support for rc.conf.d |
9 |
|
10 |
- gendepends.sh needs to read this directory to allow dependencies to be |
11 |
overridden |
12 |
- init.sh for Linux and Bsd need to read it to allow config settings |
13 |
they use to be overridden. |
14 |
|
15 |
sh/gendepends.sh.in | 5 +++++ |
16 |
sh/init.sh.BSD.in | 5 +++++ |
17 |
sh/init.sh.Linux.in | 5 +++++ |
18 |
3 files changed, 15 insertions(+) |
19 |
|
20 |
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in |
21 |
index 2ab798d..79a4bff 100644 |
22 |
--- a/sh/gendepends.sh.in |
23 |
+++ b/sh/gendepends.sh.in |
24 |
@@ -96,6 +96,11 @@ do |
25 |
fi |
26 |
|
27 |
[ -e @SYSCONFDIR@/rc.conf ] && . @SYSCONFDIR@/rc.conf |
28 |
+ if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then |
29 |
+ for _f in "@SYSCONFDIR@"/rc.conf.d/*.conf; do |
30 |
+ [ -e "$_f" ] && . "$_f" |
31 |
+ done |
32 |
+ fi |
33 |
|
34 |
if . "$_dir/$RC_SVCNAME"; then |
35 |
echo "$RC_SVCNAME" >&3 |
36 |
|
37 |
diff --git a/sh/init.sh.BSD.in b/sh/init.sh.BSD.in |
38 |
index 2a53dcd..5912a95 100644 |
39 |
--- a/sh/init.sh.BSD.in |
40 |
+++ b/sh/init.sh.BSD.in |
41 |
@@ -23,6 +23,11 @@ mount_svcdir() |
42 |
|
43 |
. "$RC_LIBEXECDIR"/sh/functions.sh |
44 |
[ -r "@SYSCONFDIR@/rc.conf" ] && . "@SYSCONFDIR@/rc.conf" |
45 |
+if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then |
46 |
+ for _f in "@SYSCONFDIR@"/rc.conf.d/*.conf; do |
47 |
+ [ -r "$_f" ] && . "$_f" |
48 |
+ done |
49 |
+fi |
50 |
|
51 |
# Disable devd until we need it |
52 |
if [ -z "$RC_SYS" -a "$RC_UNAME" = "FreeBSD" ]; then |
53 |
|
54 |
diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in |
55 |
index a8ee69e..7d36e7a 100644 |
56 |
--- a/sh/init.sh.Linux.in |
57 |
+++ b/sh/init.sh.Linux.in |
58 |
@@ -5,6 +5,11 @@ |
59 |
|
60 |
. "$RC_LIBEXECDIR"/sh/functions.sh |
61 |
[ -r "@SYSCONFDIR@/rc.conf" ] && . "@SYSCONFDIR@/rc.conf" |
62 |
+if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then |
63 |
+ for _f in "@SYSCONFDIR@"/rc.conf.d/*.conf; do |
64 |
+ [ -e "$_f" ] && . "$_f" |
65 |
+ done |
66 |
+fi |
67 |
|
68 |
# By default VServer already has /proc mounted, but OpenVZ does not! |
69 |
# However, some of our users have an old proc image in /proc |