1 |
commit: 27713e3a41574c20336fcbf4fd3522d126045f16 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 2 13:16:52 2011 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 2 13:31:43 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=27713e3a |
7 |
|
8 |
Make sure we load external scripts before using eerror |
9 |
|
10 |
Reported-by: Jochen Schlick <josch06 <AT> gmail.com> |
11 |
X-Gentoo-Bug: 388715 |
12 |
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=388715 |
13 |
|
14 |
--- |
15 |
sh/runscript.sh.in | 16 ++++++++-------- |
16 |
1 files changed, 8 insertions(+), 8 deletions(-) |
17 |
|
18 |
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in |
19 |
index 26dcfb3..010c794 100644 |
20 |
--- a/sh/runscript.sh.in |
21 |
+++ b/sh/runscript.sh.in |
22 |
@@ -33,6 +33,14 @@ loadconfig() |
23 |
fi |
24 |
} |
25 |
|
26 |
+sourcex "@SYSCONFDIR@/init.d/functions.sh" |
27 |
+sourcex "@LIBEXECDIR@/sh/rc-functions.sh" |
28 |
+ |
29 |
+# Support LiveCD foo |
30 |
+if sourcex -e "/sbin/livecd-functions.sh"; then |
31 |
+ livecd_read_commandline |
32 |
+fi |
33 |
+ |
34 |
if [ ! -e ${RC_SVCDIR}/softlevel ]; then |
35 |
eerror "You are attempting to run an openrc service on a" |
36 |
eerror "system which openrc did not boot." |
37 |
@@ -45,14 +53,6 @@ if [ ! -e ${RC_SVCDIR}/softlevel ]; then |
38 |
exit 1 |
39 |
fi |
40 |
|
41 |
-sourcex "@SYSCONFDIR@/init.d/functions.sh" |
42 |
-sourcex "@LIBEXECDIR@/sh/rc-functions.sh" |
43 |
- |
44 |
-# Support LiveCD foo |
45 |
-if sourcex -e "/sbin/livecd-functions.sh"; then |
46 |
- livecd_read_commandline |
47 |
-fi |
48 |
- |
49 |
if [ -z "$1" -o -z "$2" ]; then |
50 |
eerror "$RC_SVCNAME: not enough arguments" |
51 |
exit 1 |