Browse Source

[util] Detect genisoimage as mkisofs replacement

Debian based systems may have genisoimage(1) instead of mkisofs(1).
They are command-line compatible so the util/geniso script should be
able to choose either one.

This patch also changes the use of the mkisofs quiet (-q) flag to its
long form (-quiet).  This should be compatible with more versions of
cdrtools and cdrkit.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
tags/v1.20.1
Stefan Hajnoczi 14 years ago
parent
commit
f9f7863c55
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      src/util/geniso

+ 11
- 1
src/util/geniso View File

@@ -13,6 +13,7 @@ case $# in
13 13
 	exit 1
14 14
 	;;
15 15
 esac
16
+
16 17
 # This should be the default location of the isolinux.bin file
17 18
 isolinux_bin=${ISOLINUX_BIN:-util/isolinux.bin}
18 19
 if [ ! -r $isolinux_bin ]
@@ -20,6 +21,15 @@ then
20 21
 	echo $0: $isolinux_bin not found, please install, or set ISOLINUX_BIN in arch/i386/Makefile correctly
21 22
 	exit 1
22 23
 fi
24
+
25
+# There should either be mkisofs or the compatible genisoimage program
26
+mkisofs=`which mkisofs genisoimage | head -n1`
27
+if [ -z $mkisofs ]
28
+then
29
+	echo $0: mkisofs or genisoimage not found, please install or set PATH
30
+	exit 1
31
+fi
32
+
23 33
 out=$1
24 34
 shift
25 35
 dir=`mktemp -d bin/iso.dir.XXXXXX`
@@ -51,5 +61,5 @@ do
51 61
 	echo "" KERNEL $g
52 62
 	cp -p $f $dir/$g
53 63
 done >> $cfg
54
-mkisofs -q -l -o $out -c boot.cat -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table $dir
64
+$mkisofs -quiet -l -o $out -c boot.cat -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table $dir
55 65
 rm -fr $dir

Loading…
Cancel
Save