summaryrefslogtreecommitdiff
path: root/sh/runscript.sh.in
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-11-02 08:16:52 -0500
committerWilliam Hubbs <williamh@gentoo.org>2011-11-02 08:31:43 -0500
commit27713e3a41574c20336fcbf4fd3522d126045f16 (patch)
tree339f0a8aff3dff0e2e1aedb9618d15d5956f7aa0 /sh/runscript.sh.in
parent5066d40ac83fc9036843d670dbf816955b9f40a3 (diff)
downloadopenrc-27713e3a41574c20336fcbf4fd3522d126045f16.tar.gz
openrc-27713e3a41574c20336fcbf4fd3522d126045f16.tar.bz2
openrc-27713e3a41574c20336fcbf4fd3522d126045f16.tar.xz
Make sure we load external scripts before using eerror
Reported-by: Jochen Schlick <josch06@gmail.com> X-Gentoo-Bug: 388715 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=388715
Diffstat (limited to 'sh/runscript.sh.in')
-rw-r--r--sh/runscript.sh.in16
1 files changed, 8 insertions, 8 deletions
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index 26dcfb3..010c794 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -33,6 +33,14 @@ loadconfig()
fi
}
+sourcex "@SYSCONFDIR@/init.d/functions.sh"
+sourcex "@LIBEXECDIR@/sh/rc-functions.sh"
+
+# Support LiveCD foo
+if sourcex -e "/sbin/livecd-functions.sh"; then
+ livecd_read_commandline
+fi
+
if [ ! -e ${RC_SVCDIR}/softlevel ]; then
eerror "You are attempting to run an openrc service on a"
eerror "system which openrc did not boot."
@@ -45,14 +53,6 @@ if [ ! -e ${RC_SVCDIR}/softlevel ]; then
exit 1
fi
-sourcex "@SYSCONFDIR@/init.d/functions.sh"
-sourcex "@LIBEXECDIR@/sh/rc-functions.sh"
-
-# Support LiveCD foo
-if sourcex -e "/sbin/livecd-functions.sh"; then
- livecd_read_commandline
-fi
-
if [ -z "$1" -o -z "$2" ]; then
eerror "$RC_SVCNAME: not enough arguments"
exit 1