]> git.proxmox.com Git - mirror_lxc.git/commitdiff
ubuntu: Fix path to openssh-server's postinst
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 14 Jan 2014 23:12:29 +0000 (18:12 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 15 Jan 2014 15:04:40 +0000 (10:04 -0500)
The path isn't relative to @LOCALSTATEDIR@

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-ubuntu.in

index a707f5b9d3ffc5d7cf0735baad7a756f07ba1644..d9bb8a45da1ec2dddf91566c0c96df2e1b2b5330 100644 (file)
@@ -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