prefer installed extlinux

pull/5/head
Tomas M 2012-12-28 10:19:04 -09:00
parent b55b0693df
commit 0dbe6757f8
1 changed files with 8 additions and 2 deletions

View File

@ -11,8 +11,14 @@ cd "$BOOT"
PART="$(df . | tail -n 1 | tr -s " " | cut -d " " -f 1)" PART="$(df . | tail -n 1 | tr -s " " | cut -d " " -f 1)"
DEV="$(echo "$PART" | sed -r "s:[0-9]+\$::" | sed -r "s:([0-9])[a-z]+\$:\\1:i")" #" DEV="$(echo "$PART" | sed -r "s:[0-9]+\$::" | sed -r "s:([0-9])[a-z]+\$:\\1:i")" #"
# install syslinux bootloader # Try to use installed extlinux binary and fallback to extlinux.exe only
./extlinux.exe --install $BOOT # if no installed extlinux is not found at all.
EXTLINUX="$(which extlinux 2>/dev/null)"
if [ "$EXTLINUX" = "" ]; then
EXTLINUX="./extlinux.exe"
fi
"$EXTLINUX" --install "$BOOT"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error installing boot loader." echo "Error installing boot loader."