summaryrefslogtreecommitdiffstats
path: root/rescue/make_rescue_img
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-11-28 16:56:52 +0000
committerdamien <damien@mandriva.com>2000-11-28 16:56:52 +0000
commit0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7 (patch)
tree33f7ac905998f9ad6d85090f777ee4c0d0c67032 /rescue/make_rescue_img
parentd5c526273db473a7d87a26000585900fc10dda7d (diff)
downloaddrakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.gz
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.bz2
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.xz
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.zip
branch to build the firewall install.topic/unlabeled-1.1.1
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-xrescue/make_rescue_img20
1 files changed, 13 insertions, 7 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
index 8b9c823f4..d6667519e 100755
--- a/rescue/make_rescue_img
+++ b/rescue/make_rescue_img
@@ -22,27 +22,32 @@ BEGIN { undef *_; }
sub __ { print @_, "\n"; system(@_); }
sub _ { __ @_; $? and die; }
-sub install {
+sub install_ {
return if -e "$tmp$_[0]";
my $d = dirname($_[0]);
commands::mkdir_("-p", "$tmp$d") unless -d "$tmp$d";
- _ "$sudo cp -a $_[0] $tmp$d";
-}
-sub install_lib {
- _ "cp $_[0] $tmp$_[0]" unless -e "$tmp$_[0]";
+ _ "$sudo cp $_[1] $_[0] $tmp$d";
}
+sub install { install_($_[0], "-a") }
+sub install_lib { install_($_[0], "") }
_ "$sudo rm -rf $tmp" if -e $tmp;
_ "mkdir $tmp";
_ 'find . -name "*~" | xargs rm -f';
+foreach (cat_("dirs")) {
+ chomp;
+ commands::mkdir_("-p", "$tmp$_");
+}
_ "cp -a tree/* $tmp";
+_ "find $tmp -name 'CVS*' | xargs rm -rf";
+
foreach (keyboard::loadkeys_files) {
install($_);
symlink "$2.kmap.gz", "$tmp$1/$3.kmap.gz" if m|(.*)/((..).+)\.kmap\.gz|;
}
unlink "$tmp/usr/lib/kbd/keymaps/i386/qwertz/fr.kmap.gz";
-foreach (cat_("list")) {
+foreach (cat_("list"), cat_(`../tools/specific_arch list`)) {
chomp;
install($_);
chomp, install_lib($_) foreach `ldd $_ 2>/dev/null | grep "=>" | sed -e 's/.*=> //' -e 's/ .*//'`;
@@ -53,6 +58,7 @@ foreach (cat_("aliases")) {
}
_ "cp ../modules/modules.{cz*,dep} $tmp/modules";
+_ "install -s kernel_read_part $tmp/sbin" if $arch =~ /i.86/;
__ "$sudo strip $tmp/{lib,bin,sbin}/* $tmp/usr/{bin,sbin}/* 2>/dev/null";
exit 0 if $ARGV[0];
@@ -60,7 +66,7 @@ exit 0 if $ARGV[0];
$size = `du -s $tmp | cut -f1` + 2048; #- add 2MB of free space
commands::mkdir_("-p", $mnt) if !-e $mnt;
-__ "$sudo umount $rescue";
+__ "$sudo umount $rescue 2>/dev/null";
_ "dd if=/dev/zero of=$rescue bs=1k count=$size";
_ "$mke2fs $rescue";