]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-clone: fix dhclient.conf send hostname command
authorSerge E. Hallyn <serge.hallyn@canonical.com>
Mon, 24 Oct 2011 12:38:30 +0000 (14:38 +0200)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Mon, 24 Oct 2011 12:38:30 +0000 (14:38 +0200)
End the command with ';', which is needed, and put the hostname in
quotes (which doesn't really seem needed, but shown in man page).

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc-clone.in

index 657486dea51c0e938b995b70d482842f0c9eb95a..38369d801bafa6b243b93b18b30ba0c84dc747ce 100644 (file)
@@ -252,7 +252,7 @@ echo "Updating rootfs..."
 
 # so you can 'ssh $hostname.' or 'ssh $hostname.local'
 if [ -f $rootfs/etc/dhcp/dhclient.conf ]; then
-       sed -i "s/send host-name.*$/send host-name $hostname/" $rootfs/etc/dhcp/dhclient.conf
+       sed -i "s/send host-name.*$/send host-name \"$hostname\";/" $rootfs/etc/dhcp/dhclient.conf
 fi
 
 # set the hostname