--- DAB.pm.orig 2010-01-08 09:43:52.000000000 +0100
+++ /usr/share/perl5/PVE/DAB.pm 2010-01-08 07:54:06.000000000 +0100
@@ -387,6 +387,8 @@
$config->{ostype} = "ubuntu-8.10";
} elsif ($suite eq 'jaunty') {
$config->{ostype} = "ubuntu-9.04";
+ } elsif ($suite eq 'karmic') {
+ $config->{ostype} = "ubuntu-9.10";
} else {
die "unsupported debian suite '$suite'\n";
}
@@ -413,7 +415,7 @@
if ($suite eq 'etch' || $suite eq 'lenny') {
push @{$config->{source}}, "http://ftp.debian.org/debian SUITE main contrib";
push @{$config->{source}}, "http://security.debian.org SUITE/updates main contrib";
- } elsif ($suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty') {
+ } elsif ($suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty' || $suite eq 'karmic') {
my $comp = "main restricted universe multiverse";
push @{$config->{source}}, "http://archive.ubuntu.com/ubuntu SUITE $comp";
push @{$config->{source}}, "http://archive.ubuntu.com/ubuntu SUITE-updates $comp";
@@ -481,9 +483,12 @@
push @$excl, qw(kbd);
push @$excl, qw(apparmor apparmor-utils ntfs-3g
friendly-recovery);
- } elsif($suite eq 'intrepid' || $suite eq 'jaunty') {
+ } elsif($suite eq 'intrepid' || $suite eq 'jaunty' || $suite eq 'karmic') {
push @$excl, qw(apparmor apparmor-utils libapparmor1 libapparmor-perl
libntfs-3g28 ntfs-3g friendly-recovery);
+ if($suite eq 'karmic') {
+ push @$excl, qw(ureadahead);
+ }
} else {
push @$excl, qw(udev module-init-tools pciutils hdparm
memtest86+ parted);
@@ -768,10 +773,14 @@
my $reader;
my $pid = open2($reader, "<&STDIN", 'vzctl', 'exec2', $veid,
'defenv', @cmd) || die "unable to exec command";
-
while (defined (my $line = <$reader>)) {
$self->logmsg ($line);
}
+ waitpid( $pid, 0 );
+ my $rc=$? >> 8;
+ if ($rc != 0) {
+ die "@cmd exited with status $rc";
+ }
}
sub ve_divert_add {
@@ -1187,7 +1196,7 @@
# test if we have all 'ubuntu-minimal' and 'ubuntu-standard' packages
# except those explicitly excluded
- if ($suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty') {
+ if ($suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty' || $suite eq 'karmic') {
my $mdeps = $pkginfo->{'ubuntu-minimal'}->{depends};
foreach my $d (split (/,/, $mdeps)) {
if ($d =~ m/^\s*(\S+)$/) {
@@ -1250,6 +1259,10 @@
# avoid warnings about non-existent resolv.conf
write_file ("", "$rootdir/etc/resolv.conf", 0644);
+ if ($suite eq 'karmic') {
+ $self->run_command ("mkdir $rootdir/etc/network");
+ }
+
$data = "auto lo\niface lo inet loopback\n";
write_file ($data, "$rootdir/etc/network/interfaces", 0644);
@@ -1394,7 +1407,7 @@
# disable /dev/urandom init
$self->run_command ("install -m 0755 '$script_init_urandom' '$rootdir/etc/init.d/urandom'");
- if ($suite eq 'etch' || $suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty') {
+ if ($suite eq 'etch' || $suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty' || $suite eq 'karmic') {
# avoid klogd start
$self->ve_divert_add ("/sbin/klogd");
}
@@ -1408,7 +1421,7 @@
$cmd .= " -i '$rootdir/etc/sysctl.conf'";
$self->run_command ($cmd);
- if ($suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty') {
+ if ($suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty' || $suite eq 'karmic') {
# disable tty init (console-setup)
my $cmd = 'sed';
$cmd .= ' -e \'s/^\(ACTIVE_CONSOLES=.*\)/ACTIVE_CONSOLES=/\'';
@@ -1423,7 +1436,7 @@
$filelist .= " $rootdir/etc/sysctl.d/10-network-security.conf";
$self->run_command ("rm $filelist");
}
- if ($suite eq 'jaunty') {
+ if ($suite eq 'jaunty' || $suite eq 'karmic') {
# remove sysctl setup (avoid warnings at startup)
my $filelist = "$rootdir/etc/sysctl.d/10-console-messages.conf";
$filelist .= " $rootdir/etc/sysctl.d/10-network-security.conf";