summaryrefslogtreecommitdiffstats
path: root/rescue/make_rescue_img
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-08-03 21:48:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-08-03 21:48:55 +0000
commit9ee26d126e82fb39d526a539da071b161641c79f (patch)
treea4d8a8820d32c2861cde613b3cbad196c1917969 /rescue/make_rescue_img
parent95e8a0c96d277f8f0306f2fd726ae8031c24aacd (diff)
downloaddrakx-9ee26d126e82fb39d526a539da071b161641c79f.tar
drakx-9ee26d126e82fb39d526a539da071b161641c79f.tar.gz
drakx-9ee26d126e82fb39d526a539da071b161641c79f.tar.bz2
drakx-9ee26d126e82fb39d526a539da071b161641c79f.tar.xz
drakx-9ee26d126e82fb39d526a539da071b161641c79f.zip
fix /sbin/insmod /sbin/rmmod and /sbin/lsmod which were dead symlinks
(to /etc/alternatives/something)
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-xrescue/make_rescue_img8
1 files changed, 4 insertions, 4 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
index dc6a7cb3a..8afbb4d4e 100755
--- a/rescue/make_rescue_img
+++ b/rescue/make_rescue_img
@@ -23,7 +23,7 @@ sub install_raw {
s|^/|| foreach @_;
_ "tar c -C / @_ | tar x -C $tmp" if @_;
}
-sub install_lib {
+sub install_deref {
s|^/|| foreach @_;
_ "tar c -C / --dereference @_ | tar x -C $tmp" if @_;
}
@@ -35,9 +35,9 @@ sub install_l {
push @l,
`ldd @l 2>/dev/null | grep "=>" | perl -pe 's/.*=> //; s/ .*//; s,^/lib/.*?/,/lib/,'`;
- @l = uniq(map { chomp_($_) } @l);
- install_raw(grep { !/lib.*\.so/ } @l);
- install_lib(grep { /lib.*\.so/ } @l);
+ my ($deref, $raw) = partition { /lib.*\.so/ || readlink("/$_") =~ m|/etc/alternatives| } uniq(map { chomp_($_) } @l);
+ install_raw(@$raw);
+ install_deref(@$deref);
}
sub installown($$) {