#!/bin/bash # Copyright (C) 2018 Ian Kelling # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. [[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" x="$(readlink -f -- "$BASH_SOURCE")"; PATH="${x%/*}:$PATH" # directory of this file usage() { cat < /srv/fai/config/class/51-multi-boot rm -rf $t; mkdir -p $t LANG= fai -N -u hostname_does_not_matter dirinstall $t # Turn a dirinstall into a basefile. taken from mk-basefile chroot $t apt-get clean 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 cleanup exit 0