X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=pxe-server;h=07262fca9a70a2cf3036def43eb76fb470794b64;hb=HEAD;hp=78e25a6b9fd0de1a8771d7b0c6871525be5d2532;hpb=137ffae7de84a51c4b438ccf2fb50f5571f522a6;p=automated-distro-installer diff --git a/pxe-server b/pxe-server index 78e25a6..32a422d 100755 --- a/pxe-server +++ b/pxe-server @@ -18,11 +18,11 @@ [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -readonly this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" -script_dir="${this_file%/*}" -# shellcheck source=./bash-trace -source "${script_dir}/bash-trace" -cd $script_dir +set -e; . /usr/local/lib/bash-bear; set +e + +this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" +readonly this_file this_dir="${this_file%/*}" +cd "$this_dir" PATH="$PATH:$PWD" @@ -49,6 +49,7 @@ TYPE One of arch, parabola, plain, fai. -d Don't alter dhcp config. Only make sense for fai type, and on network other than home or fsf, when using fai-cd, or pxe-kexec. -k Pass -k to myfai-chboot. +--no-r Pass --no-r to myfai-chboot. -r Don't redeploy fai config. For example, if there is a different host that is mid-install. @@ -105,13 +106,14 @@ case $HOSTNAME in esac chboot_args=() -temp=$(getopt -l help adkrSwh "$@") || usage 1 +temp=$(getopt -l no-r,help adkrSwh "$@") || usage 1 eval set -- "$temp" while true; do case $1 in -a) wait=true; set=false; shift ;; -d) dhcp=false; shift ;; -k) chboot_args+=(-k); shift ;; + --no-r) chboot_args+=(--no-r); shift ;; -r) redep=false; shift ;; -S) chboot_args+=(-S); shift ;; -w) wait=true; set=true; shift ;; @@ -219,12 +221,14 @@ set-pxe() { if $fsf_office; then if [[ ! $cmd ]]; then e "removing pxe for $host on tarantula" + # shellcheck disable=SC2087 # shellcheck being dumb ssh tarantula.office.fsf.org bash -e <