sys-apps/systemd: enable some basic services for new installs
authorMike Gilbert <floppym@gentoo.org>
Mon, 12 Aug 2019 14:11:15 +0000 (10:11 -0400)
committerMike Gilbert <floppym@gentoo.org>
Mon, 12 Aug 2019 14:12:02 +0000 (10:12 -0400)
Also update the preset-all postinst message.

Bug: https://bugs.gentoo.org/691854
Package-Manager: Portage-2.3.71, Repoman-2.3.16_p24
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
sys-apps/systemd/systemd-242-r6.ebuild
sys-apps/systemd/systemd-243_rc1-r2.ebuild
sys-apps/systemd/systemd-9999.ebuild

index 96430b07ddd71fb002256568078e3a49a5d85d50..ca3aee2f6d17b7f7415485f5a52390e689ed136c 100644 (file)
@@ -465,6 +465,14 @@ pkg_postinst() {
                systemctl --root="${ROOT:-/}" enable "${ENABLED_UNITS[@]}"
        fi
 
+       if [[ -z ${REPLACING_VERSIONS} ]]; then
+               if type systemctl &>/dev/null; then
+                       systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
+               fi
+               elog "To enable a useful set of services, run the following:"
+               elog "  systemctl preset-all --preset-mode=enable-only"
+       fi
+
        if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
                rm "${EROOT}/var/lib/systemd/timesync"
        fi
@@ -481,11 +489,6 @@ pkg_postinst() {
                eerror "systemd again."
                eerror
        fi
-
-       if [[ -z ${REPLACING_VERSIONS} ]]; then
-               elog "To enable a useful set of services, run the following:"
-               elog "  systemctl preset-all"
-       fi
 }
 
 pkg_prerm() {
index d67b45ec87d6ecc0f7adffafdd2bcfc6f0397345..988973dd9a7ee991ce9d378c97f9a8a6307839c1 100644 (file)
@@ -449,6 +449,14 @@ pkg_postinst() {
                systemctl --root="${ROOT:-/}" enable "${ENABLED_UNITS[@]}"
        fi
 
+       if [[ -z ${REPLACING_VERSIONS} ]]; then
+               if type systemctl &>/dev/null; then
+                       systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
+               fi
+               elog "To enable a useful set of services, run the following:"
+               elog "  systemctl preset-all --preset-mode=enable-only"
+       fi
+
        if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
                rm "${EROOT}/var/lib/systemd/timesync"
        fi
@@ -465,11 +473,6 @@ pkg_postinst() {
                eerror "systemd again."
                eerror
        fi
-
-       if [[ -z ${REPLACING_VERSIONS} ]]; then
-               elog "To enable a useful set of services, run the following:"
-               elog "  systemctl preset-all"
-       fi
 }
 
 pkg_prerm() {
index c4350573c99dd6636b4ab403f46734ee087b5fb5..7556cea0b553ed1f92fffab4747d40d90d96a1b0 100644 (file)
@@ -445,6 +445,14 @@ pkg_postinst() {
                systemctl --root="${ROOT:-/}" enable "${ENABLED_UNITS[@]}"
        fi
 
+       if [[ -z ${REPLACING_VERSIONS} ]]; then
+               if type systemctl &>/dev/null; then
+                       systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
+               fi
+               elog "To enable a useful set of services, run the following:"
+               elog "  systemctl preset-all --preset-mode=enable-only"
+       fi
+
        if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
                rm "${EROOT}/var/lib/systemd/timesync"
        fi
@@ -461,11 +469,6 @@ pkg_postinst() {
                eerror "systemd again."
                eerror
        fi
-
-       if [[ -z ${REPLACING_VERSIONS} ]]; then
-               elog "To enable a useful set of services, run the following:"
-               elog "  systemctl preset-all"
-       fi
 }
 
 pkg_prerm() {