iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improvements
[automated-distro-installer]
/
mk-basefile-big
diff --git
a/mk-basefile-big
b/mk-basefile-big
index 95d2e9f2cd51f1e9f086f5a29ed405be05ffffbd..1a6b6a99bc70dc28b12b157a34967c11ab7c0a7d 100755
(executable)
--- a/
mk-basefile-big
+++ b/
mk-basefile-big
@@
-16,11
+16,13
@@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# 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 <<EOF
usage() {
cat <<EOF
@@
-45,7
+47,7
@@
EOF
exit $1
}
exit $1
}
-read distver <<<"$@"
+read
-r
distver <<<"$@"
if [[ $# != 1 ]]; then
echo "$0: error: expected one argument"
if [[ $# != 1 ]]; then
echo "$0: error: expected one argument"
@@
-87,11
+89,12
@@
sed -i 's/^LOGUSER=/#LOGUSER=/' /etc/fai/fai.conf
# config umount required after a failed run, proc umount always required
umount /var/lib/fai/config ||: ; umount -R $t/proc ||:
# config umount required after a failed run, proc umount always required
umount /var/lib/fai/config ||: ; umount -R $t/proc ||:
-fai-redep faiserver $distro
+fai-redep faiserver
.b8.nz
$distro
echo "echo $classes" > /srv/fai/config/class/51-multi-boot
rm -rf $t; mkdir -p $t
echo "echo $classes" > /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
LANG= fai -N -u hostname_does_not_matter dirinstall $t
# Turn a dirinstall into a basefile. taken from mk-basefile