Skip to content

Commit 9dce366

Browse files
committed
fix: use the correct variable names
1 parent c545ee3 commit 9dce366

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/usr/lib/rsetup/cli/system.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,16 @@ EOF
266266
}
267267

268268
get_autologin_status() {
269-
local service=$1 status
269+
local service="$1"
270+
local status="OFF"
270271

271-
if [[ -n "$(systemctl list-units --no-legend "$i".service)" ]]
272+
if [[ -n "$(systemctl list-units --no-legend "$service".service)" ]]
272273
then
273-
if ! grep -q -e "disabled" -e "not-found" <(systemctl is-enabled "$i")
274+
if ! grep -q -e "disabled" -e "not-found" <(systemctl is-enabled "$service")
274275
then
275-
case "$i" in
276+
case "$service" in
276277
serial-getty@ttyAML0|serial-getty@ttyFIQ0|getty@tty1)
277-
if grep -q -e "--autologin" "/etc/systemd/system/$i.service.d/override.conf"
278+
if grep -q -e "--autologin" "/etc/systemd/system/$service.service.d/override.conf"
278279
then
279280
status="ON"
280281
else

0 commit comments

Comments
 (0)