commit:     99401396dd0ae8cee0c5dde7137ac751142e8558
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  4 15:27:32 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 15:27:32 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99401396

sys-apps/systemd: fixup save_enabled_units

Package-Manager: Portage-2.3.62_p4, Repoman-2.3.12_p87
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/systemd/systemd-242_rc2.ebuild | 3 ++-
 sys-apps/systemd/systemd-9999.ebuild    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys-apps/systemd/systemd-242_rc2.ebuild 
b/sys-apps/systemd/systemd-242_rc2.ebuild
index 0be24409401..bbb07c49e43 100644
--- a/sys-apps/systemd/systemd-242_rc2.ebuild
+++ b/sys-apps/systemd/systemd-242_rc2.ebuild
@@ -393,7 +393,8 @@ migrate_locale() {
 }
 
 save_enabled_units() {
-       [[ -z ${ROOT} ]] || return
+       ENABLED_UNITS=()
+       type systemctl &>/dev/null || return
        for x; do
                if systemctl --quiet --root="${ROOT:-/}" is-enabled "${x}"; then
                        ENABLED_UNITS+=( "${x}" )

diff --git a/sys-apps/systemd/systemd-9999.ebuild 
b/sys-apps/systemd/systemd-9999.ebuild
index 0be24409401..bbb07c49e43 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -393,7 +393,8 @@ migrate_locale() {
 }
 
 save_enabled_units() {
-       [[ -z ${ROOT} ]] || return
+       ENABLED_UNITS=()
+       type systemctl &>/dev/null || return
        for x; do
                if systemctl --quiet --root="${ROOT:-/}" is-enabled "${x}"; then
                        ENABLED_UNITS+=( "${x}" )

Reply via email to