diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-03 21:48:55 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-03 21:48:55 +0000 |
commit | 9ee26d126e82fb39d526a539da071b161641c79f (patch) | |
tree | a4d8a8820d32c2861cde613b3cbad196c1917969 /rescue/make_rescue_img | |
parent | 95e8a0c96d277f8f0306f2fd726ae8031c24aacd (diff) | |
download | drakx-backup-do-not-use-9ee26d126e82fb39d526a539da071b161641c79f.tar drakx-backup-do-not-use-9ee26d126e82fb39d526a539da071b161641c79f.tar.gz drakx-backup-do-not-use-9ee26d126e82fb39d526a539da071b161641c79f.tar.bz2 drakx-backup-do-not-use-9ee26d126e82fb39d526a539da071b161641c79f.tar.xz drakx-backup-do-not-use-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-x | rescue/make_rescue_img | 8 |
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($$) { |