]> git.proxmox.com Git - dab.git/commitdiff
trusty: add hack to avoid util-linux preinst bug
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 26 Jun 2017 04:37:57 +0000 (06:37 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 26 Jun 2017 04:47:06 +0000 (06:47 +0200)
DAB.pm

diff --git a/DAB.pm b/DAB.pm
index 61cf5ad8c77ef0a3620ccac8897ceed1a87086a5..739f5d737a71fa21853c91f0ccd0cefd4d15d284 100644 (file)
--- a/DAB.pm
+++ b/DAB.pm
@@ -1296,12 +1296,21 @@ sub bootstrap {
 
     $self->ve_dpkg ('install', 'mawk');
     $self->ve_dpkg ('install', 'debconf');
-    
+
+    if ($suite eq 'trusty') {
+       # hack: util-linux preinst calls update-rc.d, which calls /sbin/insserv
+       $self->run_command ("ln -s /usr/lib/insserv/insserv '$rootdir/sbin/insserv'");
+    }
+
     # unpack required packages
     foreach my $p (@$required) {
        $self->ve_dpkg ('unpack', $p);
     }
 
+    if ($suite eq 'trusty') {
+       $self->run_command ("rm '$rootdir/sbin/insserv'");
+    }
+
     rename ("$rootdir/sbin/init.org", "$rootdir/sbin/init");
     $self->ve_divert_add ("/sbin/init");
     $self->run_command ("cp '$fake_init' '$rootdir/sbin/init'");