summaryrefslogtreecommitdiffstats
path: root/make_boot_img
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-26 13:57:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-26 13:57:55 +0000
commit026ab71e6de4bd5a05e66afade0a9d1b7ca15cd7 (patch)
tree715fc0786549c6ca612b571c57622886f201500d /make_boot_img
parent4798bf4d9ffebea5b15aed010dcf0b1c68276920 (diff)
downloaddrakx-backup-do-not-use-026ab71e6de4bd5a05e66afade0a9d1b7ca15cd7.tar
drakx-backup-do-not-use-026ab71e6de4bd5a05e66afade0a9d1b7ca15cd7.tar.gz
drakx-backup-do-not-use-026ab71e6de4bd5a05e66afade0a9d1b7ca15cd7.tar.bz2
drakx-backup-do-not-use-026ab71e6de4bd5a05e66afade0a9d1b7ca15cd7.tar.xz
drakx-backup-do-not-use-026ab71e6de4bd5a05e66afade0a9d1b7ca15cd7.zip
have floppy images as small as possible
Diffstat (limited to 'make_boot_img')
-rwxr-xr-xmake_boot_img8
1 files changed, 8 insertions, 0 deletions
diff --git a/make_boot_img b/make_boot_img
index e29e7d5ee..424fa554c 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -244,6 +244,10 @@ sub syslinux_cfg_all {
{ label => 'memtest', kernel => 'test/memtest.bin' },
);
}
+sub remove_ending_zero {
+ my ($img) = @_;
+ _(q(perl -0777 -pi -e 's/\0+$//' ) . $img);
+}
sub boot_img_i386 {
my ($type, $I, $img, $kernel) = @_;
@@ -297,6 +301,8 @@ sub boot_img_i386 {
_ "sync";
_ "df $tmp_mnt";
_ "$sudo umount $tmp_mnt";
+
+ remove_ending_zero($img);
}
# alias to x86 variant, slightly bigger with images though
@@ -840,4 +846,6 @@ sub drivers {
_ "df $tmp_mnt";
_ "$sudo umount $tmp_mnt";
+
+ remove_ending_zero($img);
}