diff options
author | Ulrich Ölmann | 2022-12-18 16:17:24 +0100 |
---|---|---|
committer | Ulrich Ölmann | 2022-12-18 18:30:47 +0100 |
commit | 79359734b9475abbbf18d34e36dc8f8d9c28fbb2 (patch) | |
tree | 974a8986365925321daa39966039078eeaaf47e3 /kpartx_hook | |
download | aur-79359734b9475abbbf18d34e36dc8f8d9c28fbb2.tar.gz |
add initial package and resulting .SRCINFO
The latter has been created via
makepkg --printsrcinfo > .SRCINFO
and needs to be recreated most of the times when PKGBUILD is adjusted.
Signed-off-by: Ulrich Ölmann <ulrich.oelmann@web.de>
Diffstat (limited to 'kpartx_hook')
-rw-r--r-- | kpartx_hook | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/kpartx_hook b/kpartx_hook new file mode 100644 index 000000000000..0eff6b0c254a --- /dev/null +++ b/kpartx_hook @@ -0,0 +1,22 @@ +#!/usr/bin/ash + +run_hook() { + local cryptdev cryptname="root" cryptoptions + local QUIET + + [ "${quiet}" = "y" ] && QUIET=" > /dev/null" + + if [ -n "${cryptdevice}" ]; then + IFS=: read cryptdev cryptname cryptoptions <<EOF +$cryptdevice +EOF + fi + + kpartx -v -a "/dev/mapper/${cryptname}" ${QUIET} + if [ $? -ne 0 ]; then + err "The command \"kpartx /dev/mapper/${cryptname}\" did not run successfully!" + return 1 + fi +} + +# vim: set ft=sh ts=4 sw=4 et: |