summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-28 14:20:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-28 14:20:26 +0000
commit8a4c35a42708c497288315e6133c9074e9757073 (patch)
treefc53e84e056ff2f5fb27511bf15882826dd3b02b
parent2f2a5b18e7f8063f42872e706da1cc192a07d2ad (diff)
downloadalpine-conf-8a4c35a42708c497288315e6133c9074e9757073.zip
setup-alpine: do not ask for ntp if qemu guest
-rwxr-xr-xsetup-alpine.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup-alpine.in b/setup-alpine.in
index 01523c3..554cbf2 100755
--- a/setup-alpine.in
+++ b/setup-alpine.in
@@ -16,6 +16,10 @@ get_fqdn() {
echo "${_dn:=my.domain}"
}
+is_qemu() {
+ grep -q "QEMU" /proc/cpuinfo
+}
+
usage() {
cat <<__EOF__
usage: setup-alpine [-ha] [-f FILE] [-c FILE]
@@ -161,7 +165,9 @@ fi
$PREFIX/sbin/setup-sshd ${SSHDOPTS}
-$PREFIX/sbin/setup-ntp ${NTPOPTS}
+if ! is_qemu; then
+ $PREFIX/sbin/setup-ntp ${NTPOPTS}
+fi
DEFAULT_DISK=none \
$PREFIX/sbin/setup-disk -q ${DISKOPTS}