Merge pull request #77 from dtroyer/usb-syslinux

Fix handling of new USB devices
This commit is contained in:
Jesse Andrews 2011-10-19 14:42:18 -07:00
commit df4df7a118

View file

@ -21,22 +21,25 @@ if [ -b $DEST_DIR ]; then
# We have a block device, install syslinux and mount it
DEST_DEV=$DEST_DIR
DEST_DIR=`mktemp -d mntXXXXXX`
mount $DEST_DEV $DEST_DIR
if [ ! -d $DEST_DIR/syslinux ]; then
mkdir -p $DEST_DIR/syslinux
fi
# Install syslinux on the device
syslinux --install --directory syslinux $DEST_DEV
mount $DEST_DEV $DEST_DIR
else
# We have a directory (for sanity checking output)
DEST_DEV=""
if [ ! -d $DEST_DIR/syslinux ]; then
mkdir -p $DEST_DIR/syslinux
fi
DEST_DEV=""
if [ ! -d $DEST_DIR/syslinux ]; then
mkdir -p $DEST_DIR/syslinux
fi
fi
# Get some more stuff from syslinux
for i in memdisk menu.c32; do
cp -p /usr/lib/syslinux/$i $DEST_DIR/syslinux
cp -p /usr/lib/syslinux/$i $DEST_DIR/syslinux
done
CFG=$DEST_DIR/syslinux/syslinux.cfg