summaryrefslogtreecommitdiff
path: root/slackware-bootstrap/bootstrap
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-06-18 05:24:46 +0200
committernavewindre <boneyaard@gmail.com>2025-06-18 05:24:46 +0200
commit15f41c1af833148d5f4a08d3b63e4f0345ce939a (patch)
treedb5e8a8a7f49de120396adc2d2d5c585b209bb44 /slackware-bootstrap/bootstrap
parent991da7f66b06d0e15149468be08aa7861633bdd6 (diff)
user check
Diffstat (limited to 'slackware-bootstrap/bootstrap')
-rwxr-xr-xslackware-bootstrap/bootstrap12
1 files changed, 11 insertions, 1 deletions
diff --git a/slackware-bootstrap/bootstrap b/slackware-bootstrap/bootstrap
index d628cd6..4ff4dd2 100755
--- a/slackware-bootstrap/bootstrap
+++ b/slackware-bootstrap/bootstrap
@@ -3,14 +3,24 @@ basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
username="user"
kernelver="6.15.2"
+hasuser=0
while getopts u:a:f: flag
do
case "${flag}" in
- u) username=${OPTARG};;
+ u) username=${OPTARG}
+ hasuser=1
+ ;;
esac
done
+if [[ $hasuser == 0 ]]; then
+ read -p "WARNING: username not provided. continue? [y/n] (n):" choice
+ if [[ $choice != "y" ]]; then
+ exit 1
+ fi
+fi
+
echo "working dir: $basedir"
sh $basedir/user $username