prefer installed extlinux
parent
b55b0693df
commit
0dbe6757f8
|
|
@ -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."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue