hooks

my cpt hooks
git clone git://git.ckyln.com/hooks
Log | Files | Refs | README

commit 8d8aa68651cc1204a63b51ca242553567e277d43
parent 2261df3ef218f4ada8508a86bc9f469a92c1f04d
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu, 15 Apr 2021 22:27:16 +0300

hooks: update kernel related stuff

Diffstat:
Mlib | 3+++
Mpost-install/linux | 3+++
Mpost-install/post-install | 2+-
Mpre-install/pre-install | 3+--
4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib b/lib @@ -1,6 +1,9 @@ # -*- mode: sh -*- getrdname() { + # Return if the package is not already installed + [ -d "$sys_db/$PKG" ] || return 0 + # Retrieve the kernel name to generate appropriate ramfs image while read -r file; do case "$file" in /boot/vmlinuz*) ;; *) continue; esac diff --git a/post-install/linux b/post-install/linux @@ -1,4 +1,7 @@ # -*- mode: sh -*- +log "Generating initramfs" +read -r ver _ < "$sys_db/$PKG/version" +/usr/local/bin/mkinitramfs --kernel="$ver" log "$PKG" "Regenerating grub configuration" grub-mkconfig -o /boot/grub/grub.cfg diff --git a/post-install/post-install b/post-install/post-install @@ -1,4 +1,4 @@ # -*- mode: sh -*- # Run the 'linux' script for potential kernel packages. -case "$PKG" in linux-[4-9].[0-9]*) . "$KISS_HOOK_DIR/post-install/linux"; esac +case "$PKG" in linux-zfs|linux-[4-9].[0-9]*) . "$CPT_HOOK_DIR/post-install/linux"; esac diff --git a/pre-install/pre-install b/pre-install/pre-install @@ -1,4 +1,4 @@ # -*- mode: sh -*- # Run the 'linux' script for potential kernel packages. -case "$PKG" in linux-[4-9].[0-9]*) . "$KISS_HOOK_DIR/post-install/linux"; esac- \ No newline at end of file +case "$PKG" in linux-zfs|linux-[4-9].[0-9]*) . "$CPT_HOOK_DIR/pre-install/linux"; esac