Revert "fix(systemd): Run disables before enables"
This reverts commit be8f58a035.
This commit is contained in:
parent
2447c781f3
commit
5aca8898bf
1 changed files with 9 additions and 9 deletions
|
|
@ -9,22 +9,16 @@ get_yaml_array USER_ENABLED '.user.enabled[]' "$1"
|
|||
get_yaml_array USER_DISABLED '.user.disabled[]' "$1"
|
||||
|
||||
|
||||
if [[ ${#DISABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${DISABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl disable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#ENABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${ENABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl enable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${USER_DISABLED[@]}"; do
|
||||
if [[ ${#DISABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${DISABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl --global disable $unit
|
||||
systemctl disable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
|
||||
|
|
@ -33,3 +27,9 @@ if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
|
|||
systemctl --global enable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${USER_DISABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl --global disable $unit
|
||||
done
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue