diff options
author | Stuart Cardall | 2020-09-26 14:03:10 +0100 |
---|---|---|
committer | Stuart Cardall | 2020-09-26 14:03:10 +0100 |
commit | 5ab14531daaaf9f09521f858b6dc62cc65026c32 (patch) | |
tree | 1af386241d3f36719d5d20a7486358de457f40d6 /arch-sign-modules.install | |
parent | 717f23c1b0a8a43513481bc29447be9a35f36683 (diff) | |
download | aur-5ab14531daaaf9f09521f858b6dc62cc65026c32.tar.gz |
add post_upgrade / post_remove
Diffstat (limited to 'arch-sign-modules.install')
-rw-r--r-- | arch-sign-modules.install | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/arch-sign-modules.install b/arch-sign-modules.install index 802063dd42dd..1dfd619eb381 100644 --- a/arch-sign-modules.install +++ b/arch-sign-modules.install @@ -1,3 +1,5 @@ +#!/bin/sh + # This is a default template for a post-install scriptlet. ## arg 1: the old package version #post_remove() { @@ -29,9 +31,9 @@ post_install() { done } -#post_upgrade() { - # do something here -#} +post_upgrade() { + post_install +} ## arg 1: the old package version #pre_remove() { @@ -39,6 +41,16 @@ post_install() { #} ## arg 1: the old package version -#post_remove() { - # do something here -#} +post_remove() { + local x= module_list="zfs nvidia p_lkrg" + local dkms_dir=/etc/dkms dkms_link= + + for x in $module_list; do + dkms_link="$dkms_dir/$x.conf" + if [ -L $dkms_link ]; then + echo "Removing DKMS symlink: $dkms_link" + rm -f $dkms_link + fi + fi + done +} |