diff options
Diffstat (limited to 'bin/debvm-create')
-rwxr-xr-x | bin/debvm-create | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/debvm-create b/bin/debvm-create index 0d89ad4..f6cd90a 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -350,9 +350,10 @@ case "$INITSYSTEM" in esac # set up a hostname +ETC_HOSTS_TEMPLATE='127.0.0.1 localhost\n127.0.1.1 %s\n::1 ip6-localhost ip6-loopback\n' set -- \ - "--customize-hook=echo $VMNAME >"'"$1/etc/hostname"' \ - "--customize-hook=echo 127.0.0.1 localhost $VMNAME >"'"$1/etc/hosts"' \ + "--customize-hook=echo '$VMNAME' >"'"$1/etc/hostname"' \ + "--customize-hook=printf '$ETC_HOSTS_TEMPLATE' '$VMNAME' >"'"$1/etc/hosts"' \ "$@" # allow password-less root login |