diff options
author | Mystery Man <unknown@mandriva.org> | 2000-11-08 00:01:16 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2000-11-08 00:01:16 +0000 |
commit | d5c526273db473a7d87a26000585900fc10dda7d (patch) | |
tree | 0fdaabe7a00921b6cc556601b103d344fc7ac781 /rescue/make_rescue_img | |
parent | 9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff) | |
download | drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2 drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz drakx-d5c526273db473a7d87a26000585900fc10dda7d.zip |
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-x | rescue/make_rescue_img | 20 |
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"; |