diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-08-01 09:44:47 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-08-01 09:44:47 +0000 |
commit | 07cf31e3b0131c9ae94c3427c1ab35cf4508cb61 (patch) | |
tree | 180b3f1c96d73d26cb47549ba6f7475050d84b3c /rescue/make_rescue_img | |
parent | 774ceaaa0bddccbc7bfaa41da08e3f0e934789da (diff) | |
download | drakx-backup-do-not-use-07cf31e3b0131c9ae94c3427c1ab35cf4508cb61.tar drakx-backup-do-not-use-07cf31e3b0131c9ae94c3427c1ab35cf4508cb61.tar.gz drakx-backup-do-not-use-07cf31e3b0131c9ae94c3427c1ab35cf4508cb61.tar.bz2 drakx-backup-do-not-use-07cf31e3b0131c9ae94c3427c1ab35cf4508cb61.tar.xz drakx-backup-do-not-use-07cf31e3b0131c9ae94c3427c1ab35cf4508cb61.zip |
- MDK::Common'ize for arch() support
- Don't grab /lib/i686/ libraries
- Update list to use LIB which expands to either lib64 or lib
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-x | rescue/make_rescue_img | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index 1e44e379d..a8290164b 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -4,10 +4,7 @@ use MDK::Common; use lib "../perl-install"; use keyboard; -use Config; -Config->import; -my ($arch) = $Config{archname} =~ /(.*)-/; - +$lib = (arch() =~ /x86_64/ ? "lib64" : "lib"); $tmp = "/tmp/rescue_tmp"; $mnt = "/tmp/rescue_stage2_img"; $mke2fs = "/sbin/mke2fs -q -m 0 -F -s 1"; @@ -36,7 +33,7 @@ sub install_l { @l = uniq(map { chomp_($_) } @l); push @l, - `ldd @l 2>/dev/null | grep "=>" | sed -e 's/.*=> //' -e 's/ .*//'`; + `ldd @l 2>/dev/null | grep "=>" | perl -pe 's/.*=> //; s/ .*//; s,^/lib/.*?/,/lib/,'`; @l = uniq(map { chomp_($_) } @l); install_raw(grep { !/lib.*\.so/ } @l); @@ -77,7 +74,7 @@ foreach (keyboard::loadkeys_files()) { } my $perl_version = join ".", unpack "C3", $^V; -@files = map { chomp; s/PERL_VERSION/$perl_version/g; $_ } (cat_("list"), cat_(`../tools/specific_arch list`)); +@files = map { chomp; s/PERL_VERSION/$perl_version/g; s|/LIB/|/$lib/|g; $_ } (cat_("list"), cat_(`../tools/specific_arch list`)); @files = `ls -d @files`; $? == 0 or exit 1; @@ -98,7 +95,7 @@ _ "cp ../kernel/all.modules/$main/modules.dep $tmp/modules"; installown("drvinst", "/usr/bin"); installown("guessmounts", "/usr/bin"); installown("install_bootloader", "/usr/bin"); -if ($arch =~ /^i.86/) { +if (arch() =~ /^i.86/) { installown("restore_ms_boot", "/usr/bin"); } installown("lsparts", "/usr/bin"); @@ -110,7 +107,7 @@ __ "strip $tmp/{lib,bin,sbin}/* $tmp/usr/{bin,sbin}/* 2>/dev/null"; exit 0 if $ARGV[0]; -if ($arch =~ /ppc/) { +if (arch() =~ /ppc/) { #- xfs module on PPC is 4MB! - need room to unpack it $size = `du -s $tmp | cut -f1` + 4096; #- add 4MB of free space } else { |