Skip to content

Commit

Permalink
feat: remove user default value
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChenL committed Jun 24, 2024
1 parent 5874511 commit 034b297
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/usr/lib/rsetup/cli/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ set_led_netdev() {
}

set_getty_autologin() {
local systemd_override="/etc/systemd/system/$1.d" switch="$2" execstart user="${3:-$USER}"

local systemd_override="/etc/systemd/system/$1.d" switch="$2" execstart user="$3"

if [[ "$switch" == "ON" ]]
then
Expand All @@ -204,7 +205,7 @@ EOF
}

set_sddm_autologin() {
local config_dir="/etc/sddm.conf.d" switch="$1" user="${2:-$USER}"
local config_dir="/etc/sddm.conf.d" switch="$1" user="$2"

if [[ "$switch" == "ON" ]]
then
Expand Down Expand Up @@ -239,7 +240,7 @@ EOF
}

set_lightdm_autologin() {
local config_dir="/etc/lightdm" switch="$1" user="${2:-$USER}"
local config_dir="/etc/lightdm" switch="$1" user="$2"

if [[ "$switch" == "ON" ]]
then
Expand Down Expand Up @@ -310,7 +311,7 @@ get_autologin_status() {
}

set_autologin_status() {
local item="$1" switch="$2" user="${3:-$USER}"
local item="$1" switch="$2" user="$3"

case "$item" in
serial-getty@*|getty@*)
Expand Down

0 comments on commit 034b297

Please sign in to comment.