From f554a025e17e54d88245e030756fa970298e7464 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 16 Apr 2020 14:37:02 +0200 Subject: [PATCH] 0.0.1 --- .SRCINFO | 12 ++++++++++++ 95-check-boot.hook | 12 ++++++++++++ PKGBUILD | 14 ++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .SRCINFO create mode 100644 95-check-boot.hook create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..dfacec7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = check-boot-hook + pkgdesc = Cancel package actions if /boot is not mounted + pkgver = 0.0.1 + pkgrel = 1 + url = https://git.zknt.org/chris/check-boot-hook + arch = any + license = MIT + source = 95-check-boot.hook + sha256sums = a41f0f1c9715a3f9894dc39221ebae6e666b74e24c2db8586bbcf426be694f04 + +pkgname = check-boot-hook + diff --git a/95-check-boot.hook b/95-check-boot.hook new file mode 100644 index 0000000..60a458f --- /dev/null +++ b/95-check-boot.hook @@ -0,0 +1,12 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = File +Target = boot/* +Target = usr/lib/initcpio/* + +[Action] +When = PreTransaction +Exec = /bin/sh -c 'findmnt /boot &>/dev/null || ( printf "error: /boot not mounted\n"; exit 1 )' +AbortOnFail diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..c595ee0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,14 @@ +# Maintainer: tercean +pkgname=check-boot-hook +pkgver=0.0.1 +pkgrel=1 +pkgdesc="Cancel package actions if /boot is not mounted" +arch=('any') +url="https://git.zknt.org/chris/check-boot-hook" +license=('MIT') +source=("95-check-boot.hook") +sha256sums=('a41f0f1c9715a3f9894dc39221ebae6e666b74e24c2db8586bbcf426be694f04') + +package() { + install -Dm644 '95-check-boot.hook' "${pkgdir}/usr/share/libalpm/hooks/95-check-boot.hook" +}