diff --git a/wsl-oobe.sh b/wsl-oobe.sh index b246933..780dadd 100644 --- a/wsl-oobe.sh +++ b/wsl-oobe.sh @@ -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'" diff --git a/wsl-setup b/wsl-setup index 4722334..41bb0b0 100755 --- a/wsl-setup +++ b/wsl-setup @@ -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 ############### diff --git a/wsl-setup.spec b/wsl-setup.spec index f4f8495..6e895dd 100644 --- a/wsl-setup.spec +++ b/wsl-setup.spec @@ -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.