summarylogtreecommitdiffstats
path: root/digi-dgnc-install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'digi-dgnc-install.sh')
-rw-r--r--digi-dgnc-install.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/digi-dgnc-install.sh b/digi-dgnc-install.sh
new file mode 100644
index 000000000000..098b8cc8951b
--- /dev/null
+++ b/digi-dgnc-install.sh
@@ -0,0 +1,27 @@
+_pkgname='digi-dgnc'
+_modulename='dgnc_digi'
+
+post_upgrade() {
+ set -u
+ if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
+ # depmod -a # now done by pacman hook
+ if ! lsmod | cut -d' ' -f1 | grep -q "^${_modulename}"'$'; then
+ #echo 'Reboot or load now with:'
+ #echo " sudo modprobe '${_modulename}'"
+ modprobe "${_modulename}"
+ fi
+ fi
+ set +u
+}
+
+post_install() {
+ post_upgrade
+}
+
+pre_remove() {
+ set -u
+ if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
+ rmmod "${_modulename}"
+ fi
+ set +u
+}