diff options
Diffstat (limited to 'bootcd/build.sh')
-rwxr-xr-x | bootcd/build.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bootcd/build.sh b/bootcd/build.sh index 9c8cdda..45b7faa 100755 --- a/bootcd/build.sh +++ b/bootcd/build.sh @@ -1,12 +1,13 @@ #!/bin/bash -images="root@192.168.26.134:/virtual/images/" +images="root@192.168.26.172:/virtual/images/" kickstart="http://ufo.kit.edu/ands/kickstart" #inst.stage2 in isolinux.cfg needs to match the label of ISO, to get lable use 'file <name.iso>' or 'isoinfo -d -i <name.iso>' #Lantronix Spider does not provide CDROM labels (we can add inst.stage2=cdrom, but this may break booting on multicd systems) centos74_label="CentOS 7 x86_64" centos75_label="CentOS 7 x86_64" +centos8_label="CentOS-8-BaseOS-x86_64" fedora28_label="Fedora-S-dvd-x86_64-28" die() { echo "$*" 1>&2 ; exit 1; } @@ -14,20 +15,20 @@ usage() { echo "Usage: $0 <distrib> [--cdrom]"; } [ $# -gt 0 ] || { usage; exit 1; } -distrib=$(echo $1 | grep -oP '[\w\d_\-]+') +distrib=$(echo $(basename "$1") | grep -oP '[\w\d_\-]+') label_arg=$(echo ${distrib}_label) label_std=${!label_arg} -[ -d $distrib ] || die "$distrib is not found" +[ -d "$distrib" ] || die "$distrib is not found" [ -n "$label_std" ] || die "Label for $distrib is not configured" shift ver=1 rhver=$(echo $distrib | grep -oP '\d+') +dmajor=$(echo $distrib | grep -oP '[^\d]+\d?') dname=$(echo $distrib | grep -oP '[^\d]+') - extra="" isoname="$distrib-ands$(if [ $ver -gt 1 ]; then echo $ver ; fi)" @@ -46,6 +47,7 @@ done isolinux="isolinux-${distrib}.cfg" +[ -f $isolinux ] || isolinux="isolinux-${dmajor}.cfg" [ -f $isolinux ] || isolinux="isolinux-${dname}.cfg" [ -f $isolinux ] || die "Configuration $isolinux is not found" |