A couple of bug fixes for bootstrap.

This commit is contained in:
Darren 'Tadgy' Austin 2022-09-03 17:47:55 +01:00
commit 3f174b140e

View file

@ -12,7 +12,7 @@ mkdir -p -m 755 {/opt,/opt/{bin,include,info,lib64,man,man/man{0..8},sbin,share}
# Install the CA bundles, to stop wget moaning.
echo "-> Adding CA certificates..."
cp -R ca-certificates /usr/local/share
update-ca-certificates
LC_ALL=C update-ca-certificates -f
# Install memtest86 into /boot.
# Only install if /boot exists, and this isn't an EFI system.
@ -69,8 +69,8 @@ read -r -p "----> Enter GPG decryption passphrase (appears in clear text): " PAS
# Decrypt the pushover-config.
echo "-> Decrypting /etc/pushover/*.gpg..."
for FILE in /etc/pushover/*.gpg; do
gpg -d --passphrase "$PASS" -o "/etc/pushover/${FILE%.gpg}" "$FILE"
chmod 640 "/etc/pushover/${FILE%.gpg}"
gpg -d --passphrase "$PASS" -o "${FILE%.gpg}" "$FILE"
chmod 640 "${FILE%.gpg}"
done
unset FILE
@ -149,7 +149,7 @@ unset PASS
echo "-> Archiving old logs..."
[[ ! -d /var/log/Archived ]] && mkdir -m 750 /var/log/Archived
[[ ! -d /var/log/Archived/pre-bootstrapping ]] && mkdir -m 750 /var/log/Archived/pre-bootstrapping
mv /var/log/{btmp.*,{cron,debug,maillog,messages,secure,spooler,syslog}{,.*}} /var/log/Archived/pre-bootstrapping/
mv -f /var/log/{btmp.*,{cron,debug,maillog,messages,secure,spooler,syslog}{,.*}} /var/log/Archived/pre-bootstrapping/ 2>/dev/null
# Restart syslogd.
echo "-> Restarting syslogd for new config..."