X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mk-basefile-big;h=95d2e9f2cd51f1e9f086f5a29ed405be05ffffbd;hb=HEAD;hp=370fd8b33e6aecac689641bfdc1b6340bc19e3c1;hpb=c47175685b348735b3440e16851dde2cc39b6f3f;p=automated-distro-installer diff --git a/mk-basefile-big b/mk-basefile-big index 370fd8b..1a6b6a9 100755 --- a/mk-basefile-big +++ b/mk-basefile-big @@ -16,11 +16,13 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" +set -e; . /usr/local/lib/bash-bear; set +e -x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" -x="$(readlink -f -- "$BASH_SOURCE")"; PATH="${x%/*}:$PATH" # directory of this file +this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" +readonly this_file this_dir="${this_file%/*}" +PATH="$this_dir:$PATH" # directory of this file usage() { cat < /srv/fai/config/class/51-multi-boot rm -rf $t; mkdir -p $t +# shellcheck disable=SC1007 # intentional LANG= fai -N -u hostname_does_not_matter dirinstall $t # Turn a dirinstall into a basefile. taken from mk-basefile @@ -101,7 +103,7 @@ rm -f $t/etc/hostname $t/etc/resolv.conf \ $t/var/lib/apt/lists/*_* $t/usr/bin/qemu-*-static \ $t/etc/udev/rules.d/70-persistent-net.rules echo | dd of=$t/etc/machine-id -tar --one-file-system -C $t -cf - . | gzip > /a/bin/fai-basefiles/basefiles/${distver^^}64BIG.tar.gz +tar --one-file-system -C $t -cf - . | zstd -9 > /a/bin/fai-basefiles/basefiles/${distver^^}64BIG.tar.zst cleanup