From 244cc8e97a0e43856f503046359b8bd8372dc34b Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 15 May 2019 11:39:18 -0700 Subject: x11-apps/xinit: Don't use deprecated /etc/init.d/functions.sh Closes: https://bugs.gentoo.org/504140 Signed-off-by: Matt Turner --- x11-apps/xinit/files/startDM.sh | 9 +++++++-- x11-apps/xinit/files/startDM.sh.1 | 30 ++++++++++++++++++++++++++++++ x11-apps/xinit/xinit-1.4.0-r1.ebuild | 2 +- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 x11-apps/xinit/files/startDM.sh.1 (limited to 'x11-apps/xinit') diff --git a/x11-apps/xinit/files/startDM.sh b/x11-apps/xinit/files/startDM.sh index e2da6098d6a0..a4bf30e31ba7 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.1 b/x11-apps/xinit/files/startDM.sh.1 new file mode 100644 index 000000000000..e2da6098d6a0 --- /dev/null +++ b/x11-apps/xinit/files/startDM.sh.1 @@ -0,0 +1,30 @@ +#!/bin/sh +# Copyright 1999-2011 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 + +# baselayout-1 compat +if ! type get_options >/dev/null 2>/dev/null ; then + [ -r "${svclib}"/sh/rc-services.sh ] && . "${svclib}"/sh/rc-services.sh +fi + +# Great new Gnome2 feature, AA +# We enable this by default +export GDK_USE_XFT=1 + +export RC_SVCNAME=xdm +EXEC="$(get_options service)" +NAME="$(get_options name)" +PIDFILE="$(get_options pidfile)" +START_STOP_ARGS="$(get_options start_stop_args)" + +start-stop-daemon --start --exec ${EXEC} \ +${NAME:+--name} ${NAME} ${PIDFILE:+--pidfile} ${PIDFILE} ${START_STOP_ARGS} || \ +eerror "ERROR: could not start the Display Manager" + +# vim:ts=4 diff --git a/x11-apps/xinit/xinit-1.4.0-r1.ebuild b/x11-apps/xinit/xinit-1.4.0-r1.ebuild index f8dedbb1ce77..be9e7a84a648 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 -- cgit v1.2.3-65-gdbad