Commit 2f2a5b18 authored by Natanael Copa's avatar Natanael Copa
Browse files

setup-alpine: implement -q for quick mode

less questions
parent f573d0ea
......@@ -31,12 +31,13 @@ __EOF__
exit 1
}
while getopts "af:c:h" opt ; do
while getopts "af:c:hq" opt ; do
case $opt in
a) ARCHIVE=yes;;
f) USEANSWERFILE="$OPTARG";;
c) CREATEANSWERFILE="$OPTARG";;
h) usage;;
q) quick=1;;
*) usage;;
esac
done
......@@ -121,8 +122,10 @@ grep '^iface.*dhcp' $ROOT/etc/network/interfaces > /dev/null ||\
# set root password
[ -z "$NOCOMMIT" ] && while ! passwd ; do echo "Please retry." ; done
# pick timezone
$PREFIX/sbin/setup-timezone ${TIMEZONEOPTS}
if [ -z "$quick" ]; then
# pick timezone
$PREFIX/sbin/setup-timezone ${TIMEZONEOPTS}
fi
rc-update -q add networking boot
rc-update -q add urandom boot
......@@ -151,6 +154,11 @@ sed -i -e "s/^127\.0\.0\.1.*/127.0.0.1\t${_hn}.${_dn:-$(get_fqdn)} ${_hn} localh
$PREFIX/sbin/setup-apkrepos ${APKREPOSOPTS}
# lets stop here if in "quick mode"
if [ "$quick" = 1 ]; then
exit 0
fi
$PREFIX/sbin/setup-sshd ${SSHDOPTS}
$PREFIX/sbin/setup-ntp ${NTPOPTS}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment