This commit is contained in:
chris 2020-04-16 14:37:02 +02:00
commit f554a025e1
3 changed files with 38 additions and 0 deletions

12
.SRCINFO Normal file
View file

@ -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

12
95-check-boot.hook Normal file
View file

@ -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

14
PKGBUILD Normal file
View file

@ -0,0 +1,14 @@
# Maintainer: tercean <cg@zknt.org>
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"
}