From b2db87ff26826990cf4d02db8a5622674a2f8003 Mon Sep 17 00:00:00 2001
From: Giacomo Tesio <giacomo@tesio.it>
Date: Wed, 15 Feb 2017 00:48:49 +0100
Subject: [PATCH] disk-create.sh: dd mbr.bin from $SYSLINUXMBR

If not defined, SYSLINUXMBR is /usr/lib/syslinux/mbr/mbr.bin as in Debian GNU/Linux.

However, on travis-ci configuration, SYSLINUXMBR will be as expected in Ubuntu Trusty

	/usr/lib/syslinux/mbr.bin
---
 disk-create.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/disk-create.sh b/disk-create.sh
index fb80744..5ec3398 100755
--- a/disk-create.sh
+++ b/disk-create.sh
@@ -9,6 +9,9 @@ if [ "$JEHANNE" = "" ]; then
 	exit 1
 fi
 
+if [ "$SYSLINUXMBR" == "" ]; then
+	export SYSLINUXMBR=/usr/lib/syslinux/mbr/mbr.bin # GNU/Linux Debian way
+fi
 if [ "$SYSLINUXBIOS" == "" ]; then
 	export SYSLINUXBIOS=/usr/lib/syslinux/modules/bios/ # GNU/Linux Debian way
 fi
@@ -129,7 +132,7 @@ echo halt >> /srv/hjfs.cmd
 sleep 20
 EOF
 	syslinux --offset $((2048*512)) $DISK
-	dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr/mbr.bin of=$DISK
+	dd bs=440 count=1 conv=notrunc if=$SYSLINUXMBR of=$DISK
 else
 	echo Root disk already exists: $DISK
 fi