removed grub stuff

This commit is contained in:
randogoth 2025-11-22 14:04:49 +02:00
parent f48f0615b6
commit 3a66d036dc
53 changed files with 1 additions and 183 deletions

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
shopt -s nullglob
entries_dir="/boot/loader/entries"
for f in "$entries_dir"/ostree-*.conf "$entries_dir"/*-ostree-*.conf; do
[ -f "$f" ] || continue
# Already correct? skip
if grep -qxE 'grub_class[[:space:]]+bluefin' "$f"; then
continue
fi
tmp="$(mktemp)"
if grep -qE '^grub_class[[:space:]]+' "$f"; then
sed -E 's/^grub_class[[:space:]].*/grub_class bluefin/' "$f" >"$tmp"
else
awk '1; /^title[[:space:]]/{print "grub_class bluefin";}' "$f" >"$tmp"
fi
if ! cmp -s "$f" "$tmp"; then
chmod --reference="$f" "$tmp"
chown --reference="$f" "$tmp"
command -v chcon >/dev/null 2>&1 && chcon --reference="$f" "$tmp" 2>/dev/null || true
mv -f "$tmp" "$f"
else
rm -f "$tmp"
fi
done