[Lxc-users] [PATCH 1/1] lxc-clone: fix dhclient.conf send hostname command
Serge E. Hallyn
serge.hallyn at canonical.com
Thu Sep 15 20:53:33 UTC 2011
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 at canonical.com>
---
src/lxc/lxc-clone.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lxc/lxc-clone.in b/src/lxc/lxc-clone.in
index 657486d..38369d8 100644
--- a/src/lxc/lxc-clone.in
+++ b/src/lxc/lxc-clone.in
@@ -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
--
1.7.5.4
More information about the lxc-users
mailing list