diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-28 14:10:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-28 14:10:36 +0000 |
commit | 2f2a5b18e7f8063f42872e706da1cc192a07d2ad (patch) | |
tree | f9d83695c1b4637146619fce75f7c29ee9019d49 /setup-alpine.in | |
parent | f573d0ea4039be0de8af5d4bdba563b109b4f10d (diff) | |
download | alpine-conf-2f2a5b18e7f8063f42872e706da1cc192a07d2ad.tar.bz2 alpine-conf-2f2a5b18e7f8063f42872e706da1cc192a07d2ad.tar.xz |
setup-alpine: implement -q for quick mode
less questions
Diffstat (limited to 'setup-alpine.in')
-rwxr-xr-x | setup-alpine.in | 14 |
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} |