Skip to content

Commit

Permalink
gui-libs/display-manager-init: add postinst warning
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Aisha Tammy <[email protected]>
Closes: gentoo#19272
Signed-off-by: Piotr Karbowski <[email protected]>
  • Loading branch information
epsilon-0 authored and Piotr Karbowski committed Jan 31, 2021
1 parent 683ba92 commit 1489fb9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion gui-libs/display-manager-init/display-manager-init-1.0.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
Expand Down Expand Up @@ -34,4 +34,18 @@ pkg_preinst() {
if [[ ${REPLACING_VERSIONS} == "" && -f "${EROOT}"/etc/conf.d/xdm && ! -f "${EROOT}"/etc/conf.d/display-manager ]]; then
mv "${EROOT}"/etc/conf.d/{xdm,display-manager} || die
fi
local rlevel using_xdm
using_xdm=no
for rlevel in boot default sysinit; do
if [[ -e "${EROOT}"/etc/runlevels/${rlevel}/xdm ]]; then
using_xdm=yes
fi
done
if [[ "${using_xdm}" = "yes" ]]; then
ewarn "The 'xdm' service has been removed as it is"
ewarn "being replaced by the 'display-manager' service."
ewarn "Please migrate to using 'display-manager' and"
ewarn "remember to use dispatch-conf to update the"
ewarn "config protected service files."
fi
}

0 comments on commit 1489fb9

Please sign in to comment.