diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-11-23 14:01:03 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-11-23 14:01:03 +0000 |
commit | c3724171334c910325f5171518f20ac816846e47 (patch) | |
tree | e0c5052cadc498222f83aa7f52e6f9a1a8dfc673 | |
parent | a9d86c934b269074240b0c94cf957ea19e0b08b2 (diff) | |
download | drakx-backup-do-not-use-c3724171334c910325f5171518f20ac816846e47.tar drakx-backup-do-not-use-c3724171334c910325f5171518f20ac816846e47.tar.gz drakx-backup-do-not-use-c3724171334c910325f5171518f20ac816846e47.tar.bz2 drakx-backup-do-not-use-c3724171334c910325f5171518f20ac816846e47.tar.xz drakx-backup-do-not-use-c3724171334c910325f5171518f20ac816846e47.zip |
fix patching of /etc/pcmcia/config (for new pcmcia-cs)
-rwxr-xr-x | make_boot_img | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/make_boot_img b/make_boot_img index 77be6aeda..bc87ffa0a 100755 --- a/make_boot_img +++ b/make_boot_img @@ -76,18 +76,16 @@ sub patch_pcmcia_config { my @conf_contents = cat_("$pcmcia_root/pcmcia/config"); die "$pcmcia_root/pcmcia/config seems short\n" if listlength(@conf_contents) < 10; - #- remove all modules with directories since we don't support that during install - /\s+class.*module.*/ and s|"[^"]+/([^"]+)"|"$1"|g foreach @conf_contents; - #- adjust deps foreach (cat_("all.modules/$main/modules.dep")) { /^(\S+): (.*)/ and $deps{$1} = [ split ' ', $2 ] or die "could not understand `$_' in all.modules/$main/modules.dep\n"; } foreach my $confline (@conf_contents) { $confline =~ /class.*\s+module\s+(.*)/ or next; - my @modules = map { /^\s*"([^"]+)"\s*$/ ? $1 : $_ } split ',', $1; - my @modules_with_deps = map { @{$deps{$_}}, $_ } @modules; - my $new_modz = join ', ', map { "\"$_\"" } uniq(difference2(\@modules_with_deps, \@ignore_modules_in_deps)); + my @modules = map { /"([^"]+)"(.*)/ && [ $1, $2 ] } split ',', $1; + $_->[0] =~ s|.*/([^/]+)$|$1|g foreach @modules; #- remove directories since we don't support that during install + my @deps = grep { !member($_, @ignore_modules_in_deps, map { $_->[0] } @modules) } map { @{$deps{$_->[0]}} } @modules; + my $new_modz = join ', ', (map { "\"$_\"" } @deps), (map { "\"$_->[0]\"$_->[1]" } @modules); $confline =~ s/(class.*\s+module\s+).*/$1$new_modz/; } |