1 |
commit: da4634e4944e2aace9f850a298cd64e351b6dcfb |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Fri Feb 26 19:10:28 2021 +0000 |
4 |
Commit: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 26 19:23:54 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da4634e4 |
7 |
|
8 |
gui-libs/display-manager-init: fix quotes |
9 |
|
10 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
11 |
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> |
12 |
Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org> |
13 |
|
14 |
.../display-manager-init-1.0-r3.ebuild | 54 ++++++++++++++++++++++ |
15 |
gui-libs/display-manager-init/files/startDM-r1 | 29 ++++++++++++ |
16 |
2 files changed, 83 insertions(+) |
17 |
|
18 |
diff --git a/gui-libs/display-manager-init/display-manager-init-1.0-r3.ebuild b/gui-libs/display-manager-init/display-manager-init-1.0-r3.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..1a18f3f2feb |
21 |
--- /dev/null |
22 |
+++ b/gui-libs/display-manager-init/display-manager-init-1.0-r3.ebuild |
23 |
@@ -0,0 +1,54 @@ |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+DESCRIPTION="RC init files for starting display and login managers" |
30 |
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:X11" |
31 |
+ |
32 |
+LICENSE="GPL-2" |
33 |
+SLOT="0" |
34 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux" |
35 |
+ |
36 |
+S="${WORKDIR}" |
37 |
+ |
38 |
+RDEPEND=" |
39 |
+ sys-apps/gentoo-functions |
40 |
+ !<=sys-apps/sysvinit-2.98 |
41 |
+ !<=x11-apps/xinit-1.4.1 |
42 |
+ !<=x11-base/xorg-server-1.20.10 |
43 |
+ !=x11-base/xorg-server-1.20.10-r2 |
44 |
+" |
45 |
+ |
46 |
+src_install() { |
47 |
+ newinitd "${FILESDIR}"/display-manager-setup.initd display-manager-setup |
48 |
+ newinitd "${FILESDIR}"/display-manager.initd-r1 display-manager |
49 |
+ newinitd "${FILESDIR}"/xdm.initd xdm |
50 |
+ newconfd "${FILESDIR}"/display-manager.confd display-manager |
51 |
+ newbin "${FILESDIR}"/startDM-r1 startDM |
52 |
+ # backwards compatibility |
53 |
+ dosym "${ESYSROOT}"/usr/bin/startDM /etc/X11/startDM.sh |
54 |
+} |
55 |
+ |
56 |
+pkg_preinst() { |
57 |
+ if [[ ${REPLACING_VERSIONS} == "" && -f "${EROOT}"/etc/conf.d/xdm && ! -f "${EROOT}"/etc/conf.d/display-manager ]]; then |
58 |
+ cp -a "${EROOT}"/etc/conf.d/{xdm,display-manager} || die |
59 |
+ fi |
60 |
+ local rlevel using_xdm |
61 |
+ using_xdm=no |
62 |
+ for rlevel in boot default sysinit; do |
63 |
+ if [[ -e "${EROOT}"/etc/runlevels/${rlevel}/xdm ]]; then |
64 |
+ using_xdm=yes |
65 |
+ fi |
66 |
+ done |
67 |
+ if [[ "${using_xdm}" = "yes" ]]; then |
68 |
+ ewarn "The 'xdm' service has been replaced by new 'display-manager'" |
69 |
+ ewarn "service, please switch now:" |
70 |
+ ewarn |
71 |
+ ewarn " # rc-update del xdm default" |
72 |
+ ewarn " # rc-update add display-manager default" |
73 |
+ ewarn |
74 |
+ ewarn "Remember to run etc-update or dispatch-conf to update the" |
75 |
+ ewarn "config protected service files." |
76 |
+ fi |
77 |
+} |
78 |
|
79 |
diff --git a/gui-libs/display-manager-init/files/startDM-r1 b/gui-libs/display-manager-init/files/startDM-r1 |
80 |
new file mode 100644 |
81 |
index 00000000000..b23344bbdcc |
82 |
--- /dev/null |
83 |
+++ b/gui-libs/display-manager-init/files/startDM-r1 |
84 |
@@ -0,0 +1,29 @@ |
85 |
+#!/bin/sh |
86 |
+# Copyright 1999-2021 Gentoo Authors |
87 |
+# Distributed under the terms of the GNU General Public License, v2 |
88 |
+ |
89 |
+# We need to source /etc/profile.env for stuff like $LANG to work |
90 |
+# bug #10190. |
91 |
+. /etc/profile.env |
92 |
+ |
93 |
+# need eerror |
94 |
+. /lib/gentoo/functions.sh |
95 |
+ |
96 |
+# Bail out early if on a non-OpenRC system: |
97 |
+if [ ! -d /run/openrc ]; then |
98 |
+ eerror "$0 should only be used on OpenRC systems" |
99 |
+fi |
100 |
+ |
101 |
+. /lib/rc/sh/functions.sh |
102 |
+ |
103 |
+export RC_SVCNAME=display-manager |
104 |
+EXEC="$(get_options service)" |
105 |
+NAME="$(get_options name)" |
106 |
+PIDFILE="$(get_options pidfile)" |
107 |
+START_STOP_ARGS="$(get_options start_stop_args)" |
108 |
+ |
109 |
+start-stop-daemon --start --exec "${EXEC}" \ |
110 |
+${NAME:+--name} ${NAME} ${PIDFILE:+--pidfile} ${PIDFILE} ${START_STOP_ARGS} || \ |
111 |
+eerror "ERROR: could not start the Display Manager" |
112 |
+ |
113 |
+# vim:ts=4 |