commit:     244cc8e97a0e43856f503046359b8bd8372dc34b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 15 18:39:18 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 15 18:51:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=244cc8e9

x11-apps/xinit: Don't use deprecated /etc/init.d/functions.sh

Closes: https://bugs.gentoo.org/504140
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-apps/xinit/files/startDM.sh                   | 9 +++++++--
 x11-apps/xinit/files/{startDM.sh => startDM.sh.1} | 0
 x11-apps/xinit/xinit-1.4.0-r1.ebuild              | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/x11-apps/xinit/files/startDM.sh b/x11-apps/xinit/files/startDM.sh
index e2da6098d6a..a4bf30e31ba 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-2019 Gentoo Authors
 # 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/rc/sh/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

diff --git a/x11-apps/xinit/files/startDM.sh b/x11-apps/xinit/files/startDM.sh.1
similarity index 100%
copy from x11-apps/xinit/files/startDM.sh
copy to x11-apps/xinit/files/startDM.sh.1

diff --git a/x11-apps/xinit/xinit-1.4.0-r1.ebuild 
b/x11-apps/xinit/xinit-1.4.0-r1.ebuild
index f8dedbb1ce7..be9e7a84a64 100644
--- a/x11-apps/xinit/xinit-1.4.0-r1.ebuild
+++ b/x11-apps/xinit/xinit-1.4.0-r1.ebuild
@@ -42,7 +42,7 @@ src_install() {
        xorg-2_src_install
 
        exeinto /etc/X11
-       doexe "${FILESDIR}"/chooser.sh "${FILESDIR}"/startDM.sh
+       doexe "${FILESDIR}"/chooser.sh "${FILESDIR}"/startDM.sh.1
        exeinto /etc/X11/Sessions
        doexe "${FILESDIR}"/Xsession
        exeinto /etc/X11/xinit

Reply via email to