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
 	exit 1
13
 	exit 1
14
 	;;
14
 	;;
15
 esac
15
 esac
16
+
16
 # This should be the default location of the isolinux.bin file
17
 # This should be the default location of the isolinux.bin file
17
 isolinux_bin=${ISOLINUX_BIN:-util/isolinux.bin}
18
 isolinux_bin=${ISOLINUX_BIN:-util/isolinux.bin}
18
 if [ ! -r $isolinux_bin ]
19
 if [ ! -r $isolinux_bin ]
20
 	echo $0: $isolinux_bin not found, please install, or set ISOLINUX_BIN in arch/i386/Makefile correctly
21
 	echo $0: $isolinux_bin not found, please install, or set ISOLINUX_BIN in arch/i386/Makefile correctly
21
 	exit 1
22
 	exit 1
22
 fi
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
 out=$1
33
 out=$1
24
 shift
34
 shift
25
 dir=`mktemp -d bin/iso.dir.XXXXXX`
35
 dir=`mktemp -d bin/iso.dir.XXXXXX`
51
 	echo "" KERNEL $g
61
 	echo "" KERNEL $g
52
 	cp -p $f $dir/$g
62
 	cp -p $f $dir/$g
53
 done >> $cfg
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
 rm -fr $dir
65
 rm -fr $dir

Loading…
Cancel
Save