Fix script arguments section

Resolves: RHEL-102375
This commit is contained in:
Troy Dawson 2025-07-08 07:02:59 -07:00
commit 63be665ee3
3 changed files with 9 additions and 8 deletions

View File

@ -40,13 +40,5 @@ cat > /etc/sudoers.d/wsluser << EOF
$username ALL=(ALL) NOPASSWD: ALL
EOF
# Set the default user; necessary when this script is manually run in versions
# of WSL prior to 2.4.
cat >> /etc/wsl.conf << EOF
[user]
default = "$username"
EOF
echo 'Your user has been created, is included in the wheel group, and can use sudo without a password.'
echo "To set a password for your user, run 'sudo passwd $username'"

View File

@ -54,6 +54,7 @@ case $key in
DEFAULT_NAME="${2}"
shift
else
echo
echo "ERROR: Name is not provided"
echo
usage
@ -65,6 +66,7 @@ case $key in
ICON_PATH="${2}"
shift
else
echo
echo "ERROR: Icon full path is not provided"
echo
usage
@ -72,10 +74,14 @@ case $key in
fi
;;
* )
echo
echo "ERROR BAD OPTION: $key"
echo
usage
exit 2
;;
esac
shift
done
###############

View File

@ -20,6 +20,9 @@ BuildRequires: systemd-rpm-macros
# Needed for the distribution icon
Requires: system-logos
# Utilities used by the OOBE script
Requires: shadow-utils
Requires: systemd
%description
Provides WSL specific configuration files and first-time setup script.