summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-28 14:10:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-28 14:10:36 +0000
commit2f2a5b18e7f8063f42872e706da1cc192a07d2ad (patch)
treef9d83695c1b4637146619fce75f7c29ee9019d49
parentf573d0ea4039be0de8af5d4bdba563b109b4f10d (diff)
downloadalpine-conf-2f2a5b18e7f8063f42872e706da1cc192a07d2ad.tar.bz2
alpine-conf-2f2a5b18e7f8063f42872e706da1cc192a07d2ad.tar.xz
setup-alpine: implement -q for quick mode
less questions
-rwxr-xr-xsetup-alpine.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/setup-alpine.in b/setup-alpine.in
index ad84e23..01523c3 100755
--- a/setup-alpine.in
+++ b/setup-alpine.in
@@ -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}