+# systemd does not support non-Linux systems
+# so we won't install unit files for them.
+IUSE="kernel_linux"
+
# @FUNCTION: _systemd_get_unitdir
# @INTERNAL
# @DESCRIPTION:
@@ -61,6 +65,8 @@ systemd_get_unitdir() {
systemd_dounit() {
debug-print-function ${FUNCNAME} "${@}"
+ use kernel_linux || return 0
+
local target=${1}
local service=${2}
local ud=$(_systemd_get_unitdir)
@@ -131,7 +141,11 @@ systemd_with_unitdir() {
debug-print-function ${FUNCNAME} "${@}"
local optname=${1:-systemdsystemunitdir}
- echo -n --with-${optname}="$(systemd_get_unitdir)"
+ if use kernel_linux; then
+ echo -n --with-${optname}="$(systemd_get_unitdir)"
+ else
+ echo -n --without-${optname}
+ fi
}