summaryrefslogtreecommitdiff
path: root/gui-libs/display-manager-init/files/startDM
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-31 21:30:58 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-31 21:30:58 +0000
commit99e31eb0862b39d83282317c8ebf86e0d96e06cd (patch)
treee669ce1e0b1cd5701b5ce49c3500322b9ea5c84b /gui-libs/display-manager-init/files/startDM
parent0581c768ed43d7eff0a9c11e32fcb91181b3fea3 (diff)
x11-base/xorg-server : act on gentoo news 2021-01-30-display-manager-init, but do it automatically, without user intervention
Diffstat (limited to 'gui-libs/display-manager-init/files/startDM')
-rw-r--r--gui-libs/display-manager-init/files/startDM29
1 files changed, 29 insertions, 0 deletions
diff --git a/gui-libs/display-manager-init/files/startDM b/gui-libs/display-manager-init/files/startDM
new file mode 100644
index 00000000..976d1dd2
--- /dev/null
+++ b/gui-libs/display-manager-init/files/startDM
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2
+
+# We need to source /etc/profile.env for stuff like $LANG to work
+# bug #10190.
+. /etc/profile.env
+
+# need eerror
+. /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
+
+. /lib/rc/sh/functions.sh
+
+export RC_SVCNAME=display-manager
+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