diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-10-06 04:30:23 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-10-06 04:30:23 +0200 |
commit | 65c8140d89e6d0391bee8629de2f6cc26a8f99f5 (patch) | |
tree | 696dbd205024b18d240c7234b97401bfcc79feee /bootcd/build.sh | |
parent | c9e8493bace8888129dd432bdd976a0c3aa322e2 (diff) | |
download | kickstart-65c8140d89e6d0391bee8629de2f6cc26a8f99f5.tar.gz kickstart-65c8140d89e6d0391bee8629de2f6cc26a8f99f5.tar.bz2 kickstart-65c8140d89e6d0391bee8629de2f6cc26a8f99f5.tar.xz kickstart-65c8140d89e6d0391bee8629de2f6cc26a8f99f5.zip |
CentOS8 Ands buildcd
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" |