imagestack/scripts/scripts.txt
2025-04-10 14:51:45 +02:00

23 lines
2.2 KiB
Text

d-i preseed/late_command string \
in-target bash -c 'echo "\#!/bin/bash" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "\# Install and configure a Ubuntu-PC for the charity organization angestöpselt e.V. | angestoepselt.de" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "\# created by matthias of angestöpselt e.V." >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "\# created at 2022-02-17" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "version=0.2" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "set -o errexit" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "exec 100>/tmp/z31.lock || exit 1" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "flock 100 || exit 1" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "\# Speed up script by not using unicode." >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "LC_ALL=C" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "LANG=C" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "\# some static variables" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "DEBIAN_FRONTEND=noninteractive" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "current_user=\$\(id 1000 | awk -F '\[\(\)\]' '{print \$2}'\)" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "lockfile=/tmp/z31.lock" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "sysinfofile=\$HOME/.config/systeminfo.json" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "random_tmpdir=\$\(mktemp\)" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "SCRIPT_DIR=\"\$\(dirname \"\$0\"\)\"" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "TIME=\$\(date +%Y%m%d%H%M\)" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "LOGTIME=\$\(date \"+%Y-%m-%d %H:%M:%S\"\)" >> /home/computerspende/post_hardware.sh' \
in-target bash -c 'echo "LOGFILE=\"\$SCRIPT_DIR/\$TIME-z31.log\"" >> /home/computerspende/post_hardware.sh' \
in-target chmod +x /home/computerspende/late_command.sh