From 27713e3a41574c20336fcbf4fd3522d126045f16 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 2 Nov 2011 08:16:52 -0500 Subject: Make sure we load external scripts before using eerror Reported-by: Jochen Schlick X-Gentoo-Bug: 388715 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=388715 --- sh/runscript.sh.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sh/runscript.sh.in') diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index 26dcfb3b..010c794f 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 -- cgit v1.2.3