From: Dobrica Pavlinusic Date: Tue, 10 Aug 2010 17:03:15 +0000 (+0000) Subject: overwrite /etc/hostname from name of lxc X-Git-Url: http://git.rot13.org/?p=sysadmin-cookbook;a=commitdiff_plain;h=a5267cc7459f4a7e182018f750f731f8e17c3d2b;ds=sidebyside overwrite /etc/hostname from name of lxc This allows us to make clones with different name right after boot git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@226 191e9f34-6774-4a6d-acfc-7664dacd4a2a --- diff --git a/recepies/lxc/lxc-watchdog.sh b/recepies/lxc/lxc-watchdog.sh index d2dc43e..fb5a173 100755 --- a/recepies/lxc/lxc-watchdog.sh +++ b/recepies/lxc/lxc-watchdog.sh @@ -61,6 +61,8 @@ cleanup_init_scripts() { $rootfs/etc/rc?.d/*hwclock* \ $rootfs/etc/rc?.d/*udev* \ 2>/dev/null | xargs -i rm -v {} + + echo $1 > $rootfs/etc/hostname }