Hi,
As you know, I'm quickly trying to move all our new servers to Debian squeeze. One of the last pending issues is to adapt the OpenVZ and PVE init scripts to the new policy, which basically means adding LSB init headers and not using just a symlink but do a real script install so it's not ignored.
The OpenVZ vzreboot script should be fixed in vzctl. See http://bugzilla.openvz.org/show_bug.cgi?id=1423.
I've done a pair of tests to fix the PVE side of the problem; that is, fixing ssh_gen_host_keys, and am encountering a weird problem when trying to install the script.
However, I'm stuck because dab bootstrap is failing on me, and I'm not sure why:
Can anyone lend me a pair of eyes to see what probably silly mistake is going here?
The alternative is to simply install the script and then add a symlink by hand, which would work for our really silly usecase, but I want to try this first.
As you know, I'm quickly trying to move all our new servers to Debian squeeze. One of the last pending issues is to adapt the OpenVZ and PVE init scripts to the new policy, which basically means adding LSB init headers and not using just a symlink but do a real script install so it's not ignored.
The OpenVZ vzreboot script should be fixed in vzctl. See http://bugzilla.openvz.org/show_bug.cgi?id=1423.
I've done a pair of tests to fix the PVE side of the problem; that is, fixing ssh_gen_host_keys, and am encountering a weird problem when trying to install the script.
Code:
--- DAB.pm.orig 2010-09-06 12:09:50.000000000 +0200
+++ DAB.pm 2010-09-06 13:42:23.000000000 +0200
@@ -1158,9 +1158,9 @@
my $rootdir = $self->vz_root_dir();
my $base = basename ($script);
- my $target = sprintf ("$rootdir/etc/rc${runlevel}.d/S%02d${base}", $prio);
+ my $target = "$rootdir/etc/init.d";
$self->run_command ("install -m 0755 '$script' '$target'");
- return $target;
+ $self->run_command ("update-rc.d $base start $prio $runlevel");
}
sub bootstrap {
@@ -1381,6 +1381,7 @@
# reset password
$self->ve_command ("usermod -L root");
+ # regenerate sshd host keys
$self->install_init_script ($script_ssh_init, 2, 14);
if ($mta eq 'postfix') {
--- ssh_gen_host_keys.orig 2010-09-06 12:11:10.000000000 +0200
+++ ssh_gen_host_keys 2010-09-06 12:53:23.000000000 +0200
@@ -1,4 +1,14 @@
#!/bin/sh
+### BEGIN INIT INFO
+# Provides: ssh_gen_host_keys
+# Required-Start: $local_fs
+# Required-Stop:
+# X-Start-Before: sshd
+# Default-Start: 2
+# Default-Stop:
+# Short-Description: Regenerate SSH keys
+# Description: Regenerate container SSH keys for uniqueness.
+### END INIT INFO
set -e
@@ -16,4 +26,5 @@
rm -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''
-rm -f $0
+rm -f /etc/init.d/ssh_gen_host_keys
+update-rc.d -f ssh_gen_host_keys remove
However, I'm stuck because dab bootstrap is failing on me, and I'm not sure why:
Code:
unpack: libgssapi-krb5-2
unpack: libkrb5-3
unpack: ssl-cert
unpack: libncursesw5
unpack: cpio
configure important packages
command 'update-rc.d ssh_gen_host_keys start 14 2' failed with exit code 1
command 'update-rc.d ssh_gen_host_keys start 14 2' failed with exit code 1
make: *** [all] Error 1
Can anyone lend me a pair of eyes to see what probably silly mistake is going here?
The alternative is to simply install the script and then add a symlink by hand, which would work for our really silly usecase, but I want to try this first.