summarylogtreecommitdiffstats
path: root/sunix-snx-install.sh
diff options
context:
space:
mode:
authorChris Severance2017-07-18 16:03:13 -0400
committerChris Severance2017-07-18 16:03:13 -0400
commit646975af5242e2acedd0f52390561a9d9a4699b6 (patch)
tree21c47bc1b7c782a9e3e46a02a00ab9c6b0e81fed /sunix-snx-install.sh
downloadaur-646975af5242e2acedd0f52390561a9d9a4699b6.tar.gz
Initial Import
Diffstat (limited to 'sunix-snx-install.sh')
-rw-r--r--sunix-snx-install.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/sunix-snx-install.sh b/sunix-snx-install.sh
new file mode 100644
index 000000000000..f9303eed3fd6
--- /dev/null
+++ b/sunix-snx-install.sh
@@ -0,0 +1,27 @@
+_pkgname='sunix-snx'
+_modulename='snx'
+
+post_upgrade() {
+ set -u
+ if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
+ depmod -a
+ 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
+}