Skip to content

Commit ff2a444

Browse files
committed
[fix] : Fixed an issue where Systemd units would not run
1 parent 2fea5af commit ff2a444

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

modules/share/airootfs.any/root/functions.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ _safe_systemctl(){
9595
# https://unix.stackexchange.com/questions/539147/systemctl-check-if-a-unit-service-or-target-exists
9696
if (( "$(systemctl list-unit-files "${_service}" | wc -l)" > 3 )); then
9797
if [[ "${_command}" = "enable" ]]; then
98-
if [[ "$(systemctl is-enabled "${_service}")" = "enabled" ]]; then
98+
if [[ "$(systemctl is-enabled "${_service}")" = "disabled" ]]; then
9999
systemctl enable "${_service}"
100+
else
101+
echo "${_service} has been enabled" >&2
100102
fi
101103
else
102104
systemctl "${_command}" "${_service}"

0 commit comments

Comments
 (0)