summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin English <wizardedit@gentoo.org>2017-10-18 16:41:12 -0500
committerAustin English <wizardedit@gentoo.org>2017-10-18 16:47:52 -0500
commit2bb6b9e50bdb8efc9a4627e60a4e63d38e8d6255 (patch)
tree8a9962a0b5d2c26b39617725932e6686b5ec7dcf /x11-apps/xinit
parentdev-perl/Clipboard: EAPI6 + Tests (diff)
downloadgentoo-2bb6b9e50bdb8efc9a4627e60a4e63d38e8d6255.tar.gz
gentoo-2bb6b9e50bdb8efc9a4627e60a4e63d38e8d6255.tar.bz2
gentoo-2bb6b9e50bdb8efc9a4627e60a4e63d38e8d6255.zip
x11-apps/xinit: use /lib/gentoo/functions.sh instead of deprecated /etc/init.d/functions.sh
Also bail out early if the machine is not running OpenRC, with an appropriate error Acked-By: Manuel Rüger <mrueg@gentoo.org> Gentoo-Bug: https://bugs.gentoo.org/504140 Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'x11-apps/xinit')
-rw-r--r--x11-apps/xinit/files/startDM.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/x11-apps/xinit/files/startDM.sh b/x11-apps/xinit/files/startDM.sh
index 66cceb3a68f5..21fb452df1e3 100644
--- a/x11-apps/xinit/files/startDM.sh
+++ b/x11-apps/xinit/files/startDM.sh
@@ -1,12 +1,17 @@
#!/bin/sh
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2
# We need to source /etc/profile for stuff like $LANG to work
# bug #10190.
. /etc/profile
-. /etc/init.d/functions.sh
+. /lib/gentoo/functions.sh
+
+# Bail out early if on a non-OpenRC system:
+if [ ! -d /run/openrc ]; then
+ eerror "$0 should only be used on OpenRC systems"
+fi
# baselayout-1 compat
if ! type get_options >/dev/null 2>/dev/null ; then