mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 00:42:13 +00:00
ubuntu: Fix path to openssh-server's postinst
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>
This commit is contained in:
parent
ce68d5b481
commit
07219a02df
@ -95,7 +95,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# generate new SSH keys
|
# 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
|
cat > $rootfs/usr/sbin/policy-rc.d << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exit 101
|
exit 101
|
||||||
@ -104,7 +104,7 @@ EOF
|
|||||||
|
|
||||||
rm -f $rootfs/etc/ssh/ssh_host_*key*
|
rm -f $rootfs/etc/ssh/ssh_host_*key*
|
||||||
mv $rootfs/etc/init/ssh.conf $rootfs/etc/init/ssh.conf.disabled
|
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
|
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
|
sed -i "s/root@$(hostname)/root@$hostname/g" $rootfs/etc/ssh/ssh_host_*.pub
|
||||||
|
Loading…
Reference in New Issue
Block a user