x11-apps/xinit: use /lib/gentoo/functions.sh instead of deprecated /etc/init.d/functi...
authorAustin English <wizardedit@gentoo.org>
Wed, 18 Oct 2017 21:41:12 +0000 (16:41 -0500)
committerAustin English <wizardedit@gentoo.org>
Wed, 18 Oct 2017 21:47:52 +0000 (16:47 -0500)
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

x11-apps/xinit/files/startDM.sh

index 66cceb3a68f5b3737513e4ab45d09af399703191..21fb452df1e3ca3f24cf3bd55ac73d04711f73cf 100644 (file)
@@ -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