diff options
-rw-r--r-- | config-parabola-box-beefcake-base.PKGBUILD | 13 | ||||
-rw-r--r-- | config-parabola-mgmt-grub.PKGBUILD | 34 |
2 files changed, 45 insertions, 2 deletions
diff --git a/config-parabola-box-beefcake-base.PKGBUILD b/config-parabola-box-beefcake-base.PKGBUILD index 283f79d..8a8e79d 100644 --- a/config-parabola-box-beefcake-base.PKGBUILD +++ b/config-parabola-box-beefcake-base.PKGBUILD @@ -12,8 +12,6 @@ depends+=( # #### base setup -depends+=(grub) - add-file etc/hostname <<EOF beefcake.parabola.nu EOF @@ -34,6 +32,17 @@ EOF install -d etc/ssl/private ln -s ../../letsencrypt/live/$(cat etc/hostname) etc/ssl/private/myhostname +# ##### boot + +depends+=(config-parabola-mgmt-grub) + +add-file -m755 usr/share/holo/files/10-"$pkgname"/etc/default/grub.holoscript <<-'EOF' + #!/usr/bin/sed -r ' + /GRUB_CMDLINE_LINUX_DEFAULT/ aGRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0" + /GRUB_TERMINAL_OUTPUT/ aGRUB_TERMINAL_OUTPUT="serial console" + ' | awk '$0==""||!x[$0]++' + EOF + # ##### performance depends+=(haveged) diff --git a/config-parabola-mgmt-grub.PKGBUILD b/config-parabola-mgmt-grub.PKGBUILD new file mode 100644 index 0000000..c3621db --- /dev/null +++ b/config-parabola-mgmt-grub.PKGBUILD @@ -0,0 +1,34 @@ +. ${BUILDFILE%/*}/common.sh +pkgver=20180909 + +package() { +preamble +pkgdesc="Parabola server configuration: Automatically update grub.cfg" + +depends+=(grub) + +add-file etc/pacman.d/hooks/95-grub-config.hook <<-'EOF' + [Trigger] + Type = File + Operation = Install + Operation = Upgrade + Operation = Remove + Target = boot/* + Target = etc/grub.d/* + Target = etc/default/grub + Target = usr/share/holo/files/*/etc/default/grub* + + [Trigger] + Type = Package + Operation = Install + Operation = Upgrade + Target = grub + + [Action] + Description = Updating GRUB configuration + When = PostTransaction + Exec = /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg + EOF + +postamble +} |