diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-09-09 17:02:27 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-09-09 17:02:27 -0400 |
commit | 80796c91d1d9d75359997ff04deb6cd9f785101b (patch) | |
tree | b7876b4896ff902fb3f379031916d4e0644b7bd7 | |
parent | c6ffb08a51ea98f6a94f931cb482c7197989b737 (diff) |
Add grub configuration on beefcake.
-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 +} |