[azure] UBUNTU: [Debian] Don't abort installation if update-initramfs is missing

Submitted by Marcelo Cerri on Aug. 8, 2017, 7:16 p.m.

Details

Message ID 1502219771-14143-6-git-send-email-marcelo.cerri@canonical.com
State New
Headers show

Commit Message

Marcelo Cerri Aug. 8, 2017, 7:16 p.m.
BugLink: http://bugs.launchpad.net/bugs/1700972

Change the control scripts to ignore the initramfs generation when
initramfs-tools is not available.

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
---
 debian/control-scripts/postinst | 2 +-
 debian/control-scripts/postrm   | 2 ++
 debian/control-scripts/preinst  | 2 ++
 debian/control-scripts/prerm    | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)

Comments

Marcelo Cerri Aug. 11, 2017, 10:38 p.m.
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>

Patch hide | download patch | download mbox

diff --git a/debian/control-scripts/postinst b/debian/control-scripts/postinst
index 808575ce8a80..43de83fa5891 100644
--- a/debian/control-scripts/postinst
+++ b/debian/control-scripts/postinst
@@ -142,7 +142,7 @@  if (-r "$CONF_LOC" && -f "$CONF_LOC"  ) {
   }
 }
 
-
+$initrd = '' if (! -x "$ramdisk");
 
 # For some versions of kernel-package, we had this warning in the
 # postinst, but the rules did not really interpolate the value in.
diff --git a/debian/control-scripts/postrm b/debian/control-scripts/postrm
index 227e351fc59b..9879178e2147 100644
--- a/debian/control-scripts/postrm
+++ b/debian/control-scripts/postrm
@@ -156,6 +156,8 @@  if (-r "$CONF_LOC" && -f "$CONF_LOC"  ) {
   }
 }
 
+$initrd = '' if (! -x "$ramdisk");
+
 if ($link_in_boot) {
   $image_dest = "/$image_dir/";
   $image_dest =~ s|^/*|/|o;
diff --git a/debian/control-scripts/preinst b/debian/control-scripts/preinst
index 972377609fce..4c70e36b9631 100644
--- a/debian/control-scripts/preinst
+++ b/debian/control-scripts/preinst
@@ -161,6 +161,8 @@  if (-r "$CONF_LOC" && -f "$CONF_LOC"  ) {
   }
 }
 
+$initrd = '' if (! -x "$ramdisk");
+
 $ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;
 
 # About to upgrade this package from version $2 TO THIS VERSION.
diff --git a/debian/control-scripts/prerm b/debian/control-scripts/prerm
index 07e41461d3ab..755247f8e35e 100644
--- a/debian/control-scripts/prerm
+++ b/debian/control-scripts/prerm
@@ -163,6 +163,7 @@  if (-r "$CONF_LOC" && -f "$CONF_LOC"  ) {
   }
 }
 
+$initrd = '' if (! -x "$ramdisk");
 
 $ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;