Permalink
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (55 sloc) 1.86 KB
# this are the program default vars for the user configurable variables
# !!! DO NOT EDIT THIS FILE !!!
# /etc/grml/terminalserver/config is what you are searching for
if [ -e /lib/live/mount/medium ] ; then
MOUNT_POINT_="/lib/live/mount/medium" # since around December 2012
elif [ -e '/live/image' ]; then
MOUNT_POINT_="/live/image" # until around December 2012
else
MOUNT_POINT_="/cdrom" # very old
fi
# assume we have a grml2usb system
if [ -d "$MOUNT_POINT_"/boot/release ] ; then
DATA_PATH_="$MOUNT_POINT_/boot/release"
else # no grml2usb but running from CD
DATA_PATH_="$MOUNT_POINT_/boot"
fi
# new grml2usb layout
if [ -d "$MOUNT_POINT_"/boot/syslinux ] ; then
ISOLIN_PATH_="$MOUNT_POINT_/boot/syslinux"
test -d $ISOLIN_PATH_ || ISOLIN_PATH_="$MOUNT_POINT_"
else # old layout
ISOLIN_PATH_="$DATA_PATH_/isolinux"
test -d $ISOLIN_PATH_ || ISOLIN_PATH_="$MOUNT_POINT_"
fi
# addons
if [[ "$(find $MOUNT_POINT_ -maxdepth 3 -name memtest |head -n1)" != "" ]] ; then
ADDONS_PATH_="$(dirname $(find $MOUNT_POINT_ -maxdepth 3 -name memtest |head -n1))"
fi
if [[ $ADDONS_PATH_ == "" ]]; then
ADDONS_PATH_="$MOUNT_POINT_"
fi
if [[ "$(find $DATA_PATH_/ -maxdepth 2 -name vmlinuz |head -n1)" != "" ]] ; then
MULTIBOOT_PATH_="${DATA_PATH_}"
else
MULTIBOOT_PATH_="$MOUNT_POINT_"
fi
if [[ $MULTIBOOT_PATH_ == "" ]]; then
MULTIBOOT_PATH_="$MOUNT_POINT_"
fi
MEMTEST_IMAGE_="$ADDONS_PATH_/memtest"
if [ ! -f "$MEMTEST_IMAGE_" ] ; then
MEMTEST_IMAGE_=$(find /boot -name memtest*.bin | head -n1)
fi
PXE_BOOT_MSG_="$ISOLIN_PATH_/boot.msg"
# grml2usb with grub doesn't provide boot.msg, so generate a default one
if ! [ -f "$PXE_BOOT_MSG_" ] ; then
PXE_BOOT_MSG_="$(mktemp)"
cat > $PXE_BOOT_MSG_ << EOF
17 logo.16
Some information and boot options available via keys F2 - F10. http://grml.org/
EOF
fi
PXE_BOOT_LOGO_="$ISOLIN_PATH_/logo.16"
IPTABLES_SNAT_="true"
# EOF