From: Stéphane Graber Date: Tue, 3 Dec 2013 20:15:41 +0000 (-0500) Subject: lxc-ubuntu: Replace the hostname in ssh pubkey X-Git-Tag: lxc-1.0.0.beta1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5d32181c550f75ef83f13ba1ca2eff3997b3621;p=thirdparty%2Flxc.git lxc-ubuntu: Replace the hostname in ssh pubkey Signed-off-by: Stéphane Graber Acked-by: Serge Hallyn --- diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in index 18cacf686..e20a874c4 100644 --- a/templates/lxc-ubuntu.in +++ b/templates/lxc-ubuntu.in @@ -106,6 +106,8 @@ EOF DPKG_MAINTSCRIPT_PACKAGE=openssh DPKG_MAINTSCRIPT_NAME=postinst chroot $rootfs $LOCALSTATEDIR/lib/dpkg/info/openssh-server.postinst configure mv $rootfs/etc/init/ssh.conf.disabled $rootfs/etc/init/ssh.conf + sed -i "s/root@$(hostname)/root@$hostname/g" $rootfs/etc/ssh/ssh_host_*.pub + rm -f $rootfs/usr/sbin/policy-rc.d fi