diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-10-29 15:49:56 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-10-29 15:49:56 +0000 |
commit | 368a0547548096f496c71a6690124366cc05424c (patch) | |
tree | 8cee6e048e359f9365285cc35423c5fa5968a218 | |
parent | c9adec1f7b35b8220c59dceec242d6e85e088708 (diff) | |
download | drakx-368a0547548096f496c71a6690124366cc05424c.tar drakx-368a0547548096f496c71a6690124366cc05424c.tar.gz drakx-368a0547548096f496c71a6690124366cc05424c.tar.bz2 drakx-368a0547548096f496c71a6690124366cc05424c.tar.xz drakx-368a0547548096f496c71a6690124366cc05424c.zip |
don't get bitten another time by "suddenly disappearing" modules
-rwxr-xr-x | tools/update_images | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/update_images b/tools/update_images index cb75aebe8..1cc5ea533 100755 --- a/tools/update_images +++ b/tools/update_images @@ -1,9 +1,10 @@ #!/usr/bin/perl -@ARGV == 2 or die "Usage: $0 filename.img imagetype\n ex. $0 cdrom-changedisk.img cdrom\n\nPut the old images (*.img), new vmlinuz, new modules.dep and new *.mar files in a fresh directory, and update each image file one by one."; +@ARGV == 3 or die "Usage: $0 filename.img imagetype path_to_mar_bin\n ex. $0 cdrom-changedisk.img cdrom\n\nPut the old images (*.img), new vmlinuz, new modules.dep and new *.mar files in a fresh directory, and update each image file one by one."; $file = $ARGV[0]; $img = $ARGV[1]; +$marbin = $ARGV[2]; sub __ { print @_, "\n"; system(@_); } sub _ { __ @_; $? and die; } @@ -32,6 +33,8 @@ system("df $topdir/img"); print "\n"; _ "cp -f vmlinuz $topdir/img/vmlinuz"; +system("$marbin -l $topdir/initrd/modules/modules.mar | sort > $topdir/oldmar"); +system("$marbin -l ${img}_modules.mar | sort > $topdir/newmar"); _ "cp -f ${img}_modules.mar $topdir/initrd/modules/modules.mar"; _ "cp -f modules.dep $topdir/initrd/modules/modules.dep"; @@ -42,6 +45,8 @@ print "\n\tNew sizes:\n"; print `ls -l vmlinuz`; print `ls -l ${img}_modules.mar`; system("df $topdir/img"); +print "\nDiff from old to new marfiles:\n"; +print `diff -u $topdir/oldmar $topdir/newmar`; print "\n"; _ "umount $topdir/img"; |