-
Notifications
You must be signed in to change notification settings - Fork 141
/
inc-openbsd.cfg
38 lines (35 loc) · 1.24 KB
/
inc-openbsd.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
# OpenBSD
#
# Files may be named like ccccDD.iso or cccDD-fff.iso where "c" stands for
# arbitrary amounts of characters and "D" for arbitrary amounts of digits.
# "f" stands for flavor. Examples: cd66.iso, install66.iso, cd66-my.iso
#
# If "f" is any architecture supported by OpenBSD ISO's it will be considered
# as such. Otherwise "amd64" is used as default. Examples: cd66-macppc.iso,
# install66-i386.iso
function add_menu {
isofile="$1"
regexp \
--set 1:isoname \
--set 2:variant \
--set 3:vmayor \
--set 4:vminor \
--set 5:flavor \
"^${isopath}/openbsd/(([^0-9]+)([0-9]+)([0-9])[-]?(.*)\.iso)\$" "${isofile}"
version="${vmayor}.${vminor}"
arch="amd64"
if [ $flavor = 'alpha' -o $flavor = 'amd64' -o $flavor = 'hppa' -o $flavor = 'i386' -o $flavor = 'macppc' -o $flavor = 'sparc64' ]; then arch="${flavor}"; fi
menuentry "OpenBSD ${version} ${variant} ${flavor}" "${isofile}" "${isoname}" "${version}" "${arch}" --class openbsd {
set isofile=$2
set isoname=$3
set version=$4
set arch=$5
use "${isoname}"
# kernelopts=" ssh=password lang=de "
# export kernelopts
loop ${isofile}
set root=(loop)
kopenbsd /${version}/${arch}/bsd.rd
}
}
for_each_sorted add_menu "$isopath"/openbsd/*.iso