From 9ee26d126e82fb39d526a539da071b161641c79f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 3 Aug 2003 21:48:55 +0000 Subject: fix /sbin/insmod /sbin/rmmod and /sbin/lsmod which were dead symlinks (to /etc/alternatives/something) --- rescue/make_rescue_img | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rescue') 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($$) { -- cgit v1.2.1