*Bug 689329* <
https://bugzilla.redhat.com/show_bug.cgi?id=689329> -
livecd-iso-to-disk
installs syslinux files in root directory
From the bug report:
The new set -o pipefail option, set early, changes a return value in
checkSyslinuxVersion() leading to SYSLINUXPATH being set to "".
The attached patch rewrites the test. The earlier test tested the usage
function in /usr/bin/syslinux.
The replacement checks the the --version output for a general 'syslinux'
response.
This should exercise the installed program like the previous test, but I'm not
familiar with the use case for the failure condition that leads to SYSLINUXPATH
being set to "".
--Fred
commit 56856fab4f5a01e73d96ac7dbfc434f001b401e1
Author: Live System User <liveuser(a)localhost.localdomain>
Date: Mon Mar 21 02:30:40 2011 -0400
Fix pipefailure in checkSyslinuxVersion()
Use a list operation to bypass the erroneous return value.
Alter the test to something that could be used to check the
syslinux version, if desired.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index deb5473..70e80ba 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -559,7 +559,8 @@ checkSyslinuxVersion() {
echo "You need to have syslinux installed to run this script"
exit 1
fi
- if ! syslinux 2>&1 | grep -qe -d; then
+ check=($(syslinux --version 2>&1)) || :
+ if [[ 'syslinux' == $check ]]; then
SYSLINUXPATH=""
elif [ -n "$multi" ]; then
SYSLINUXPATH="$LIVEOS/syslinux"
@@ -1006,7 +1007,6 @@ fi
[ -n "$efi" -a ! -d $TGTMNT$EFI_BOOT ] && mkdir -p $TGTMNT$EFI_BOOT
# Live image copy
-set -o pipefail
if [ "$srctype" = "live" -a -z "$skipcopy" ]; then
echo "Copying live image to target device."
[ ! -d $TGTMNT/$LIVEOS ] && mkdir $TGTMNT/$LIVEOS