diff options
author | William Hubbs <williamh@gentoo.org> | 2011-04-22 07:30:10 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2011-05-11 14:54:41 -0500 |
commit | 40341fcd7e66b8a72e0407bb509d149305aa529a (patch) | |
tree | 76ec76d0fa605f5a91c7f353a6263f859fcf1b04 /sh | |
parent | 8fcaba9a22ac0deda7dc6a8d5f270d1df08f9966 (diff) |
do not run services if openrc did not boot the system
X-Gentoo-Bug: 364159
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=364159
Diffstat (limited to 'sh')
-rw-r--r-- | sh/runscript.sh.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index 229d1ee7..71935a08 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -16,6 +16,18 @@ sourcex() 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." + eerror "You may be inside a chroot or you may have used" + eerror "another initialization system to boot this system." + eerror "In this situation, you will get unpredictable results!" + eerror + eerror "If you really want to do this, issue the following command:" + eerror "touch ${RC_SVCDIR}/softlevel" + exit 1 +fi + sourcex "@SYSCONFDIR@/init.d/functions.sh" sourcex "@LIBEXECDIR@/sh/rc-functions.sh" |