summaryrefslogtreecommitdiffstats
path: root/make_boot_img
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-02 19:48:21 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-02 19:48:21 +0000
commit9176797a41f4acb22259ffa0b7e58d49b1bceac3 (patch)
treec655e423b29d899df9f332247e1640b142300a03 /make_boot_img
parentedeac12d2a69a099fdf5fec50e389699de21c2c2 (diff)
downloaddrakx-backup-do-not-use-9176797a41f4acb22259ffa0b7e58d49b1bceac3.tar
drakx-backup-do-not-use-9176797a41f4acb22259ffa0b7e58d49b1bceac3.tar.gz
drakx-backup-do-not-use-9176797a41f4acb22259ffa0b7e58d49b1bceac3.tar.bz2
drakx-backup-do-not-use-9176797a41f4acb22259ffa0b7e58d49b1bceac3.tar.xz
drakx-backup-do-not-use-9176797a41f4acb22259ffa0b7e58d49b1bceac3.zip
no_comment
Diffstat (limited to 'make_boot_img')
-rwxr-xr-xmake_boot_img13
1 files changed, 8 insertions, 5 deletions
diff --git a/make_boot_img b/make_boot_img
index aa1bf0edb..45eb6fbe7 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -30,20 +30,23 @@ $0 =~ /initrd/ ?
sub __ { print @_, "\n"; system(@_); }
sub _ { __ @_; $? and die; }
+sub install_s { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" }
sub initrd {
my ($mnt, $img) = @_;
my $tmp = "$ENV{HOME}/tmp/initrd";
- my $inst1 = -d "$instdir/install1_$type" ? "install1_$type" : "install1";
-
- _ "install -s $instdir/installinit/init $instdir/$inst1/sbin/init";
- _ "install -s $instdir/$install $instdir/$inst1/sbin/install";
+ my $tar = "$instdir/install1_$type.tar.bz2";
+ -e $tar or $tar = "$instdir/install1.tar.bz2";
__ "$sudo umount $tmp $mnt 2>/dev/null";
_ "dd if=/dev/zero of=$tmp bs=1k count=2000";
_ "$mke2fs $tmp";
_ "$sudo mount -t ext2 $tmp $mnt -o loop";
- _ "$sudo cp -a $instdir/$inst1/* $mnt";
+
+ _ "$sudo tar xyC $mnt -f $tar";
+ install_s("$instdir/installinit/init", "$mnt/sbin");
+ install_s("$instdir/$install", "$mnt/sbin/install");
+
_ "$sudo cp -f install_${type}_modules/* $mnt/modules/" if -d "install_${type}_modules";
_ "$sudo cp -f modules/${type}_modules.cgz $mnt/modules/modules.cgz";
_ "$sudo cp -f modules/modules.dep $mnt/modules/";