diff options
author | Ben Hutchings <benh@debian.org> | 2010-04-04 23:07:13 +0000 |
---|---|---|
committer | Ben Hutchings <benh@debian.org> | 2010-04-04 23:07:13 +0000 |
commit | e830d343fd5fab5b99cbe8400edb08fc27a3c740 (patch) | |
tree | fb4b02d12f78a7967e21f662cf02f3eb46775286 | |
parent | caa46d1b3095235bdc97087b98b72ed569a39e9b (diff) | |
download | kernel_replicant_linux-e830d343fd5fab5b99cbe8400edb08fc27a3c740.tar.gz kernel_replicant_linux-e830d343fd5fab5b99cbe8400edb08fc27a3c740.tar.bz2 kernel_replicant_linux-e830d343fd5fab5b99cbe8400edb08fc27a3c740.zip |
linux-base: Report when hdparm.conf or mdadm.conf may need to be updated (Closes: #576442)
svn path=/dists/sid/linux-2.6/; revision=15485
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/linux-base.postinst | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 87bc2185b99b..cf4b51c661e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,8 @@ linux-2.6 (2.6.32-11) UNRELEASED; urgency=low * linux-base: Redirect stdin and stdout of child processes to avoid interfering with debconf (Closes: #574987) * [x86] Add ramzswap driver (Closes: #573912) + * linux-base: Report when hdparm.conf or mdadm.conf may need to be updated + (Closes: #576442) [ maximilian attems] * [alpha, hppa] Disable oprofile as tracing code is unsupported here. diff --git a/debian/linux-base.postinst b/debian/linux-base.postinst index 5f2ea1cefe04..f6d1aebbbdb0 100644 --- a/debian/linux-base.postinst +++ b/debian/linux-base.postinst @@ -887,6 +887,23 @@ sub cryptsetup_update { } } +# hdparm + +sub hdparm_list { + my ($file) = @_; + my (@results) = (); + + # I really can't be bothered to parse this mess. Just see if + # there's anything like a device name on a non-comment line. + while (<$file>) { + if (!/^\s*#/) { + push @results, grep({m|^/dev/|} split(/\s+/)); + } + } + + return @results; +} + ### list of all configuration files and functions my @config_files = ({packages => 'mount', @@ -963,7 +980,18 @@ my @config_files = ({packages => 'mount', {packages => 'cryptsetup', path => '/etc/crypttab', list => \&cryptsetup_list, - update => \&cryptsetup_update}); + update => \&cryptsetup_update}, + # mdadm.conf requires manual update because it may + # contain wildcards. + {packages => 'mdadm', + path => '/etc/mdadm/mdadm.conf'}, + # hdparm.conf requires manual update because it + # (1) refers to whole disks (2) might not work + # properly with the new drivers (3) is in a very + # special format. + {packages => 'hdparm', + path => '/etc/hdparm.conf', + list => \&hdparm_list}); ### Filesystem labels and UUIDs |