-
Notifications
You must be signed in to change notification settings - Fork 1
/
default_config
67 lines (53 loc) · 1.79 KB
/
default_config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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 /run/live/medium ] ; then
MOUNT_POINT_='/run/live/medium' # since Dec. 2018
elif [ -e /lib/live/mount/medium ] ; then
MOUNT_POINT_="/lib/live/mount/medium"
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
17logo.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