1 |
commit: 1489fb9dc4df8c340aeacbb95b913965cb9c1816 |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Sun Jan 31 14:17:32 2021 +0000 |
4 |
Commit: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 21:35:40 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1489fb9d |
7 |
|
8 |
gui-libs/display-manager-init: add postinst warning |
9 |
|
10 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
11 |
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/19272 |
13 |
Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org> |
14 |
|
15 |
.../display-manager-init/display-manager-init-1.0.ebuild | 16 +++++++++++++++- |
16 |
1 file changed, 15 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/gui-libs/display-manager-init/display-manager-init-1.0.ebuild b/gui-libs/display-manager-init/display-manager-init-1.0.ebuild |
19 |
index 576a0a7c887..586c5ddc0f5 100644 |
20 |
--- a/gui-libs/display-manager-init/display-manager-init-1.0.ebuild |
21 |
+++ b/gui-libs/display-manager-init/display-manager-init-1.0.ebuild |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2020 Gentoo Authors |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=7 |
28 |
@@ -34,4 +34,18 @@ pkg_preinst() { |
29 |
if [[ ${REPLACING_VERSIONS} == "" && -f "${EROOT}"/etc/conf.d/xdm && ! -f "${EROOT}"/etc/conf.d/display-manager ]]; then |
30 |
mv "${EROOT}"/etc/conf.d/{xdm,display-manager} || die |
31 |
fi |
32 |
+ local rlevel using_xdm |
33 |
+ using_xdm=no |
34 |
+ for rlevel in boot default sysinit; do |
35 |
+ if [[ -e "${EROOT}"/etc/runlevels/${rlevel}/xdm ]]; then |
36 |
+ using_xdm=yes |
37 |
+ fi |
38 |
+ done |
39 |
+ if [[ "${using_xdm}" = "yes" ]]; then |
40 |
+ ewarn "The 'xdm' service has been removed as it is" |
41 |
+ ewarn "being replaced by the 'display-manager' service." |
42 |
+ ewarn "Please migrate to using 'display-manager' and" |
43 |
+ ewarn "remember to use dispatch-conf to update the" |
44 |
+ ewarn "config protected service files." |
45 |
+ fi |
46 |
} |