45 | 45 |
+++ b/sh/openrc-run.sh.in
|
46 | 46 |
@@ -246,30 +246,35 @@
|
47 | 47 |
done
|
48 | |
|
|
48 |
|
49 | 49 |
# Load our script
|
50 | 50 |
-sourcex "$RC_SERVICE"
|
|
51 |
-
|
|
52 |
-eval "printf '%s\n' $required_dirs" | while read _d; do
|
|
53 |
- if [ -n "$_d" ] && [ ! -d "$_d" ]; then
|
|
54 |
- eerror "$RC_SVCNAME: \`$_d' is not a directory"
|
|
55 |
- exit 1
|
51 | 56 |
+lsbh=$(lsb2rcconf "$RC_SERVICE")
|
52 | 57 |
+if [ -n "${lsbh}" ]; then
|
53 | 58 |
+ eval "${lsbh}"
|
54 | 59 |
+else
|
55 | 60 |
+ sourcex "$RC_SERVICE"
|
56 | |
|
57 | |
-eval "printf '%s\n' $required_dirs" | while read _d; do
|
58 | |
- if [ -n "$_d" ] && [ ! -d "$_d" ]; then
|
59 | |
- eerror "$RC_SVCNAME: \`$_d' is not a directory"
|
60 | |
- exit 1
|
61 | |
- fi
|
62 | |
-done
|
63 | |
-[ $? -ne 0 ] && exit 1
|
64 | |
-unset _d
|
|
61 |
+
|
65 | 62 |
+ eval "printf '%s\n' $required_dirs" | while read _d; do
|
66 | 63 |
+ if [ -n "$_d" ] && [ ! -d "$_d" ]; then
|
67 | 64 |
+ eerror "$RC_SVCNAME: \`$_d' is not a directory"
|
|
70 | 67 |
+ done
|
71 | 68 |
+ [ $? -ne 0 ] && exit 1
|
72 | 69 |
+ unset _d
|
73 | |
|
|
70 |
+
|
|
71 |
+ eval "printf '%s\n' $required_files" | while read _f; do
|
|
72 |
+ if [ -n "$_f" ] && [ ! -r "$_f" ]; then
|
|
73 |
+ eerror "$RC_SVCNAME: \`$_f' is not readable"
|
|
74 |
+ exit 1
|
|
75 |
+ fi
|
|
76 |
+ done
|
|
77 |
+ [ $? -ne 0 ] && exit 1
|
|
78 |
+ unset _f
|
|
79 |
+
|
|
80 |
+ if [ -n "$opts" ]; then
|
|
81 |
+ ewarn "Use of the opts variable is deprecated and will be"
|
|
82 |
+ ewarn "removed in the future."
|
|
83 |
+ ewarn "Please use extra_commands, extra_started_commands or extra_stopped_commands."
|
|
84 |
fi
|
|
85 |
-done
|
|
86 |
-[ $? -ne 0 ] && exit 1
|
|
87 |
-unset _d
|
|
88 |
-
|
74 | 89 |
-eval "printf '%s\n' $required_files" | while read _f; do
|
75 | 90 |
- if [ -n "$_f" ] && [ ! -r "$_f" ]; then
|
76 | 91 |
- eerror "$RC_SVCNAME: \`$_f' is not readable"
|
|
79 | 94 |
-done
|
80 | 95 |
-[ $? -ne 0 ] && exit 1
|
81 | 96 |
-unset _f
|
82 | |
+ eval "printf '%s\n' $required_files" | while read _f; do
|
83 | |
+ if [ -n "$_f" ] && [ ! -r "$_f" ]; then
|
84 | |
+ eerror "$RC_SVCNAME: \`$_f' is not readable"
|
85 | |
+ exit 1
|
86 | |
+ fi
|
87 | |
+ done
|
88 | |
+ [ $? -ne 0 ] && exit 1
|
89 | |
+ unset _f
|
90 | |
|
|
97 |
-
|
91 | 98 |
-if [ -n "$opts" ]; then
|
92 | 99 |
- ewarn "Use of the opts variable is deprecated and will be"
|
93 | 100 |
- ewarn "removed in the future."
|
94 | 101 |
- ewarn "Please use extra_commands, extra_started_commands or extra_stopped_commands."
|
95 | |
+ if [ -n "$opts" ]; then
|
96 | |
+ ewarn "Use of the opts variable is deprecated and will be"
|
97 | |
+ ewarn "removed in the future."
|
98 | |
+ ewarn "Please use extra_commands, extra_started_commands or extra_stopped_commands."
|
99 | |
+ fi
|
100 | 102 |
fi
|
101 | 103 |
|
102 | 104 |
while [ -n "$1" ]; do
|
|
126 | 128 |
SUBDIR+= tools
|
127 | 129 |
--- a/src/librc/librc-depend.c
|
128 | 130 |
+++ b/src/librc/librc-depend.c
|
129 | |
@@ -1565,14 +1565,6 @@
|
|
131 |
@@ -1568,14 +1568,6 @@
|
130 | 132 |
strcmp(depend, service) == 0)
|
131 | 133 |
continue;
|
132 | 134 |
|
|
157 | 159 |
}
|
158 | 160 |
if (options & LS_DIR) {
|
159 | 161 |
snprintf(file, sizeof(file), "%s/%s",
|
160 | |
@@ -511,16 +504,6 @@
|
|
162 |
@@ -570,16 +563,6 @@
|
161 | 163 |
errno = EINVAL;
|
162 | 164 |
return false;
|
163 | 165 |
}
|
|
250 | 252 |
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
251 | 253 |
--- a/src/rc/rc-misc.c
|
252 | 254 |
+++ b/src/rc/rc-misc.c
|
253 | |
@@ -286,7 +286,7 @@
|
|
255 |
@@ -284,7 +284,7 @@
|
254 | 256 |
sigprocmask(SIG_SETMASK, &old, NULL);
|
255 | 257 |
|
256 | 258 |
/* Safe to run now */
|