From 639ed2a6846e629b3ace24145b6b0e332bb3df9f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 25 Jan 2005 13:31:33 +0000 Subject: factorize code in VERSION() --- make_boot_img | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/make_boot_img b/make_boot_img index de1a4c341..3e3f1328e 100755 --- a/make_boot_img +++ b/make_boot_img @@ -697,6 +697,15 @@ rescue-net: boots the rescue image from a network server } +sub VERSION { + my ($kernels) = @_; + + map { "$_\n" } + $ENV{DISTRIB_DESCR}, + scalar gmtime(), + '', @$kernels; +} + sub syslinux_all_files { my ($dir, $kernels) = @_; @@ -741,10 +750,7 @@ sub boot_iso { syslinux_all_files('.boot_iso/isolinux', $kernels); - output('.boot_iso/VERSION', map { "$_\n" } - $ENV{DISTRIB_DESCR}, - scalar gmtime(), - '', @$kernels); + output('.boot_iso/VERSION', VERSION($kernels)); _ "cp /usr/lib/syslinux/isolinux.bin .boot_iso/isolinux/isolinux.bin"; output('.boot_iso/isolinux/isolinux.cfg', syslinux_cfg_all('cdrom-changedisk')); -- cgit v1.2.1