summaryrefslogtreecommitdiffstats
path: root/rescue/make_rescue_img
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-xrescue/make_rescue_img20
1 files changed, 7 insertions, 13 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
index d6667519e..8b9c823f4 100755
--- a/rescue/make_rescue_img
+++ b/rescue/make_rescue_img
@@ -22,32 +22,27 @@ 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 $_[1] $_[0] $tmp$d";
+ _ "$sudo cp -a $_[0] $tmp$d";
+}
+sub install_lib {
+ _ "cp $_[0] $tmp$_[0]" unless -e "$tmp$_[0]";
}
-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"), cat_(`../tools/specific_arch list`)) {
+foreach (cat_("list")) {
chomp;
install($_);
chomp, install_lib($_) foreach `ldd $_ 2>/dev/null | grep "=>" | sed -e 's/.*=> //' -e 's/ .*//'`;
@@ -58,7 +53,6 @@ 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];
@@ -66,7 +60,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 2>/dev/null";
+__ "$sudo umount $rescue";
_ "dd if=/dev/zero of=$rescue bs=1k count=$size";
_ "$mke2fs $rescue";