overwrite /etc/hostname from name of lxc
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 10 Aug 2010 17:03:15 +0000 (17:03 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 10 Aug 2010 17:03:15 +0000 (17:03 +0000)
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

recepies/lxc/lxc-watchdog.sh

index d2dc43e..fb5a173 100755 (executable)
@@ -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
 }