[lxc-devel] [PATCH 2/2] ubuntu: Fix path to openssh-server's postinst
Serge Hallyn
serge.hallyn at ubuntu.com
Wed Jan 15 14:45:02 UTC 2014
Quoting Stéphane Graber (stgraber at ubuntu.com):
> The path isn't relative to @LOCALSTATEDIR@
>
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> templates/lxc-ubuntu.in | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
> index a707f5b..d9bb8a4 100644
> --- a/templates/lxc-ubuntu.in
> +++ b/templates/lxc-ubuntu.in
> @@ -95,7 +95,7 @@ EOF
> fi
>
> # generate new SSH keys
> - if [ -x $rootfs$LOCALSTATEDIR/lib/dpkg/info/openssh-server.postinst ]; then
> + if [ -x $rootfs/var/lib/dpkg/info/openssh-server.postinst ]; then
> cat > $rootfs/usr/sbin/policy-rc.d << EOF
> #!/bin/sh
> exit 101
> @@ -104,7 +104,7 @@ EOF
>
> rm -f $rootfs/etc/ssh/ssh_host_*key*
> mv $rootfs/etc/init/ssh.conf $rootfs/etc/init/ssh.conf.disabled
> - DPKG_MAINTSCRIPT_PACKAGE=openssh DPKG_MAINTSCRIPT_NAME=postinst chroot $rootfs $LOCALSTATEDIR/lib/dpkg/info/openssh-server.postinst configure
> + DPKG_MAINTSCRIPT_PACKAGE=openssh DPKG_MAINTSCRIPT_NAME=postinst chroot $rootfs /var/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
> --
> 1.8.5.2
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list