blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
24 stars 25 forks source link

Minor typos in systemd.sh #38

Closed vietchinh closed 11 months ago

vietchinh commented 11 months ago

Hello,

It comes to my attention that this code snippet in systemd.sh doesn't align to the documentation:

get_yaml_array ENABLED '.system.enabled[]' "$1"
get_yaml_array DISABLED '.system.disabled[]' "$1"
get_yaml_array USER_ENABLED '.user.enabled[]' "$1"
get_yaml_array USER_DISABLED '.user.disabled[]' "$1"

image

I am not sure which one takes precedence.

Oh, and the user systemd array name isn't used in the for loop.

if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
    for unit in "${>>ENABLED<<[@]}"; do
        unit=$(printf "$unit")
        systemctl --user enable $unit
    done
fi
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
    for unit in "${>>DISABLED<<[[@]}"; do
        unit=$(printf "$unit")
        systemctl --user disable $unit
    done
fi