From 186bb5d773dca029b1542715388a9c9b9c56a855 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 7 Jun 2024 17:29:52 +0200 Subject: [PATCH] add missing ;; --- usr/lib/archboot/installer/configuration.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr/lib/archboot/installer/configuration.sh b/usr/lib/archboot/installer/configuration.sh index 1d7b3ab59..c633e6090 100644 --- a/usr/lib/archboot/installer/configuration.sh +++ b/usr/lib/archboot/installer/configuration.sh @@ -207,8 +207,10 @@ _user_management() { _DEFAULT="--default-item ${_NEXTITEM}" #shellcheck disable=SC2086 if grep wheel "${_DESTDIR}"/etc/group | grep -q "${_USER}"; then + _ADMIN_ATTR=1 _USER_ATTR="| Administrator | wheel group" else + _ADMIN_ATTR="" _USER_ATTR="| User | no wheel group" fi _dialog --title " Account ${_USER} ${_USER_ATTR} " --no-cancel ${_DEFAULT} --menu "" 11 60 5 \ @@ -229,13 +231,13 @@ _user_management() { sleep 2 fi ;; "3") _NEXTITEM="3" - if [[ "${_USER_ATTR}" == "| Administrator | wheel group" ]]; then + if [[ -n "${_ADMIN_ATTR}" ]]; then usermod -R "${_DESTDIR}" -aG wheel "${_USER}" - _dialog --title " Success " --no-mouse --infobox "User ${_USER} removed as Administrator and from wheel group." 3 60 + _dialog --title " Success " --no-mouse --infobox "User ${_USER} removed as Administrator and from wheel group." 3 70 sleep 2 else usermod -R "${_DESTDIR}" -rG wheel "${_USER}" - _dialog --title " Success " --no-mouse --infobox "User ${_USER} added as Administrator and added to wheel group." 3 60 + _dialog --title " Success " --no-mouse --infobox "User ${_USER} added as Administrator and added to wheel group." 3 70 sleep 2 fi ;; "4") if _NEXTITEM="4"