[kernel] r15424 - dists/sid/linux-2.6/debian
Ben Hutchings
benh at alioth.debian.org
Sat Mar 20 05:37:49 UTC 2010
Author: benh
Date: Sat Mar 20 05:37:46 2010
New Revision: 15424
Log:
linux-base.postinst: Display an (additional) note if the boot loader configuration is not recognised
Modified:
dists/sid/linux-2.6/debian/linux-base.postinst
dists/sid/linux-2.6/debian/linux-base.templates
Modified: dists/sid/linux-2.6/debian/linux-base.postinst
==============================================================================
--- dists/sid/linux-2.6/debian/linux-base.postinst Sat Mar 20 04:53:27 2010 (r15423)
+++ dists/sid/linux-2.6/debian/linux-base.postinst Sat Mar 20 05:37:46 2010 (r15424)
@@ -818,32 +818,38 @@
path => '/boot/grub/menu.lst',
list => \&grub1_list,
update => \&grub1_update,
- post_update => \&grub1_post},
+ post_update => \&grub1_post,
+ is_boot_loader => 1},
{packages => 'grub-common',
path => '/etc/default/grub',
list => \&grub2_list,
update => \&grub2_update,
- post_update => \&grub2_post},
+ post_update => \&grub2_post,
+ is_boot_loader => 1},
{packages => 'lilo',
path => '/etc/lilo.conf',
list => \&lilo_list,
update => \&lilo_update,
- post_update => \&lilo_post},
+ post_update => \&lilo_post,
+ is_boot_loader => 1},
{packages => 'elilo',
path => '/etc/elilo.conf',
list => \&lilo_list,
update => \&lilo_update,
- post_update => \&elilo_post},
+ post_update => \&elilo_post,
+ is_boot_loader => 1},
{packages => 'extlinux',
path => extlinux_old_path(),
list => \&extlinux_old_list,
update => \&extlinux_old_update,
- post_update => \&extlinux_post},
+ post_update => \&extlinux_post,
+ is_boot_loader => 1},
{packages => 'extlinux',
path => '/etc/default/extlinux',
list => \&extlinux_new_list,
update => \&extlinux_new_update,
- post_update => \&extlinux_post},
+ post_update => \&extlinux_post,
+ is_boot_loader => 1},
{packages => 'udev',
path => '/etc/udev/rules.d/70-persistent-cd.rules',
needs_update => \&udev_cd_needs_update,
@@ -1238,8 +1244,13 @@
my @found_configs = scan_config_files();
my @matched_configs =
grep({@{$_->{devices}} || $_->{id_map_text}} @found_configs);
+ my $found_boot_loader =
+ grep({$_->{config}->{is_boot_loader} && $_->{installed}} @found_configs);
- if ($#matched_configs < 0) {
+ # We can skip all of this if we didn't find any configuration
+ # files that need conversion and we found the configuration file
+ # for an installed boot loader.
+ if (!@matched_configs && $found_boot_loader) {
return;
}
@@ -1257,7 +1268,7 @@
($ret, $answer) = get($question);
die "Error retrieving answer for $question: $answer" if $ret;
- if ($answer eq 'true') {
+ if (@matched_configs && $answer eq 'true') {
scan_devices();
assign_new_ids();
@@ -1326,6 +1337,20 @@
die "Error showing debconf note $question: $seen";
}
}
+
+ # Also note whether some (unknown) boot loader configuration file
+ # must be manually converted.
+ if (!$found_boot_loader) {
+ $question = 'linux-base/disk-id-manual-boot-loader';
+ ($ret, $seen) = input('high', $question);
+ if ($ret && $ret != 30) {
+ die "Error setting debconf note $question: $seen";
+ }
+ ($ret, $seen) = go();
+ if ($ret && $ret != 30) {
+ die "Error showing debconf note $question: $seen";
+ }
+ }
}
package main;
Modified: dists/sid/linux-2.6/debian/linux-base.templates
==============================================================================
--- dists/sid/linux-2.6/debian/linux-base.templates Sat Mar 20 04:53:27 2010 (r15423)
+++ dists/sid/linux-2.6/debian/linux-base.templates Sat Mar 20 05:37:46 2010 (r15424)
@@ -46,3 +46,14 @@
change when using the new kernel:
.
${unconverted}
+
+Template: linux-base/disk-id-manual-boot-loader
+Type: note
+Description: Check the boot loader configuration before rebooting
+ The boot loader configuration for this system was not recognised. These
+ settings in the configuration may need to be updated:
+ .
+ * The root device id passed as a kernel parameter
+ * The boot device id used to install and update the boot loader
+ .
+ We recommend that you identify these devices by UUID or label.
More information about the Kernel-svn-changes
mailing list