forked from aguslr/multibootusb
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmbusb.cfg
48 lines (42 loc) · 975 Bytes
/
mbusb.cfg
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
# Partition holding files
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
export imgdevpath rootuuid
# Custom variables
set isopath="/boot/isos"
export isopath
# Load modules
insmod regexp
insmod all_video
# MultiBoot USB menu
submenu "Multiboot ->" {
# Warning for 32-bit systems
if ! cpuid -l; then
clear
echo "This is a 32-bit computer."
echo "You won't get to use 64-bit software on it."
echo
echo -n "To continue, press ESC or wait 10 seconds... "
sleep --interruptible 10
echo
echo
fi
# Load custom configuration
if [ -e "$prefix/mbusb.cfg.local" ]; then
source "$prefix/mbusb.cfg.local"
fi
# Load configuration files
echo -n "Loading configuration files... "
for cfgfile in $prefix/mbusb.d/*.d/*.cfg; do
source "$cfgfile"
done
}
# loopback wrapper
function _loopback {
loop="$1"
path="$2"
if [ -e ($loop) ]; then
loopback -d $loop
fi
loopback "$loop" "$path"
}