diff --git a/src/usr/lib/rsetup/cli/system.sh b/src/usr/lib/rsetup/cli/system.sh index b4afd46..cc4e9d3 100644 --- a/src/usr/lib/rsetup/cli/system.sh +++ b/src/usr/lib/rsetup/cli/system.sh @@ -251,8 +251,8 @@ set_gdm_autologin() { fi if [[ "$switch" == "ON" ]]; then - sed -i '/^# Rsetup/,/# Rsetup$/d' $config_dir/daemon.conf - cat << EOF | tee -a $config_dir/daemon.conf >/dev/null + sed -i '/^# Rsetup/,/# Rsetup$/d' "$config_dir/daemon.conf" + cat << EOF | tee -a "$config_dir/daemon.conf" >/dev/null # Rsetup # Auto generated by rsetup # DO NOT MODIFY! @@ -262,7 +262,7 @@ AutomaticLoginEnable=true # Rsetup EOF else - sed -i '/^# Rsetup/,/# Rsetup$/d' $config_dir/daemon.conf + sed -i '/^# Rsetup/,/# Rsetup$/d' "$config_dir/daemon.conf" fi } @@ -272,7 +272,7 @@ set_lightdm_autologin() { if [[ "$switch" == "ON" ]]; then mkdir -p "$config_dir" - cat << EOF | tee -a $config_dir/50-rsetup-autologin.conf >/dev/null + cat << EOF | tee -a "$config_dir/50-rsetup-autologin.conf" >/dev/null # Auto generated by rsetup # DO NOT MODIFY! [Seat:*] @@ -289,7 +289,7 @@ get_autologin_status() { case "$service" in *getty@*.service) - if grep -q -e "--autologin" <(grep -v '^#' "/etc/systemd/system/$service.d/50-rsetup-autologin.conf") + if grep -q -e "--autologin" <(grep -v '^#' "/etc/systemd/system/${service}.d/50-rsetup-autologin.conf") then echo "ON" else