summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/easy-boot/APKBUILD45
-rw-r--r--system/easy-boot/easy-boot.trigger2
-rw-r--r--system/easy-boot/update-boot13
-rw-r--r--system/easy-kernel/APKBUILD2
4 files changed, 61 insertions, 1 deletions
diff --git a/system/easy-boot/APKBUILD b/system/easy-boot/APKBUILD
new file mode 100644
index 000000000..e8189164c
--- /dev/null
+++ b/system/easy-boot/APKBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=easy-boot
+pkgver=1.0
+pkgrel=0
+pkgdesc="APK trigger to automatically update boot configuration"
+url="https://www.adelielinux.org/"
+arch="noarch"
+options="!check" # No test suite.
+license="NCSA"
+depends="/bin/sh"
+makedepends=""
+subpackages="no-boot:none"
+provides="kernel-boot"
+provider_priority=10
+triggers="$pkgname.trigger=/boot"
+source="update-boot"
+
+package() {
+ install -Dm755 "$srcdir"/update-boot \
+ "$pkgdir"/usr/sbin/update-boot
+
+ mkdir -p "$pkgdir"/etc/easy-boot.d
+ cat >"$pkgdir"/etc/easy-boot.d/README <<-EOF
+ This directory contains hooks that will be executed when the files
+ in /boot are upgraded, in particular the kernel from easy-kernel.
+ Each hook will be executed in collation order. The current numbering
+ conventions are:
+
+ 20 - initramfs generation
+ 50 - bootloader configuration
+
+ To completely disable this mechanism, install the "no-boot" package.
+
+ The hooks can be re-run manually using the "update-boot" command.
+ EOF
+}
+
+none() {
+ pkgdesc="Disable boot configuration from automatically updating"
+ depends=""
+ provides="kernel-boot"
+ provider_priority=1
+ mkdir -p "$subpkgdir"
+}
+sha512sums="7436693956df66bebeef20937f210c889d109ba85456d4cd3c115d00e4c68f3f5b51dbaa1859a729c2599b344e21d45c484fe278c43c7c59bb04a4159e9b6577 update-boot"
diff --git a/system/easy-boot/easy-boot.trigger b/system/easy-boot/easy-boot.trigger
new file mode 100644
index 000000000..63f7f1850
--- /dev/null
+++ b/system/easy-boot/easy-boot.trigger
@@ -0,0 +1,2 @@
+#!/bin/sh -e
+exec update-boot
diff --git a/system/easy-boot/update-boot b/system/easy-boot/update-boot
new file mode 100644
index 000000000..a3e45ebf4
--- /dev/null
+++ b/system/easy-boot/update-boot
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+rc=0
+
+for i in /etc/easy-boot.d/*; do
+ [ -x "$i" ] || continue
+ printf '>>> %s\n' "${i##*/}" >&2
+ if ! "$i"; then
+ printf '>>> Kernel boot hook failed!\n' >&2
+ rc="$((rc + 1))"
+ fi
+done
+
+exit "$rc"
diff --git a/system/easy-kernel/APKBUILD b/system/easy-kernel/APKBUILD
index c22db250f..b1ef436ce 100644
--- a/system/easy-kernel/APKBUILD
+++ b/system/easy-kernel/APKBUILD
@@ -12,7 +12,7 @@ url="https://kernel.org/"
arch="all"
options="!check !dbg !strip !tracedeps"
license="GPL-2.0-only"
-depends=""
+depends="kernel-boot"
makedepends="bc bison flex gzip kmod lzop openssl-dev rsync xz"
provides="easy-kernel$_kflavour=$pkgver-r$pkgrel"
replaces="easy-kernel-power8 easy-kernel-power8-64k"