Pacho requested that to be able to warn users in GNOME packages that do
not work anymore without systemd.
---
 gx86/eclass/systemd.eclass | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
index 166c7be..a2750d7 100644
--- a/gx86/eclass/systemd.eclass
+++ b/gx86/eclass/systemd.eclass
@@ -252,3 +252,20 @@ systemd_update_catalog() {
                debug-print "${FUNCNAME}: journalctl not found."
        fi
 }
+
+# @FUNCTION: systemd_is_booted
+# @DESCRIPTION:
+# Check whether the system was booted using systemd.
+#
+# Returns 0 if systemd is used to boot the system, 1 otherwise.
+#
+# See: man sd_booted
+systemd_update_catalog() {
+       debug-print-function ${FUNCNAME} "${@}"
+
+       [[ -d /run/systemd/system ]]
+       local ret=${?}
+
+       debug-print "${FUNCNAME}: [[ -d /run/systemd/system ]] -> ${ret}"
+       return ${ret}
+}
-- 
1.8.3.2


Reply via email to