summarylogtreecommitdiffstats
path: root/dgrp-install.sh
diff options
context:
space:
mode:
authorChris Severance2017-07-05 22:11:17 -0400
committerChris Severance2017-07-05 22:11:17 -0400
commit92705c83b9bdf85532813adb840aebfdad02e1d7 (patch)
tree1e008c8994ec158167165bf6dc05b4ae3bcabadb /dgrp-install.sh
parent468192a086f9d58cc4f17be60d04082370ba46d2 (diff)
downloadaur-92705c83b9bdf85532813adb840aebfdad02e1d7.tar.gz
Update to 1.9.37
Diffstat (limited to 'dgrp-install.sh')
-rw-r--r--dgrp-install.sh44
1 files changed, 25 insertions, 19 deletions
diff --git a/dgrp-install.sh b/dgrp-install.sh
index c82211d78a6e..3710099a0e86 100644
--- a/dgrp-install.sh
+++ b/dgrp-install.sh
@@ -1,11 +1,10 @@
-# Automatically generated by dgrp-1.9.36 PKGBUILD from Arch Linux AUR
-# http://aur.archlinux.org/
+_daemons=('daemon' 'ditty')
pre_install() {
set -u
- # Ensure that config files don't get lost on reinstall, chiefly from the digi make install to package upgrade
+ # Ensure that config files don't get lost on reinstall, chiefly from the Digi make install to package upgrade
# post_install code will rename it back
- if [ -s '/etc/dgrp.backing.store' -a ! -s '/etc/dgrp.backing.store.pacsave' ]; then
+ if [ -s '/etc/dgrp.backing.store' ] && [ ! -s '/etc/dgrp.backing.store.pacsave' ]; then
mv '/etc/dgrp.backing.store' '/etc/dgrp.backing.store.pacsave'
fi
set +u
@@ -13,17 +12,21 @@ pre_install() {
post_upgrade() {
set -u
- mandb -q
- /usr/bin/dgrp/config/postinstall # this used to run depmod -a
- depmod -a
+ #mandb -q
# rmdir '/tmp/dgrp' # postinstall forgets to remove this. Useful on /tmp folders that are not mounted tmpfs
systemctl daemon-reload
+ #udevadm control --reload # Seems to work without this
# Digi's postinstall automatically loads the daemons so we might as well too
- for _daemon in daemon ditty; do
- systemctl enable "dgrp_${_daemon}.service"
- systemctl start "dgrp_${_daemon}.service"
- done
- #echo "RealPort (dgrp) startup scripts updated or installed"
+ if [ ! -d /usr/src/dgrp-*/ ]; then # detect DKMS
+ /usr/bin/dgrp/config/postinstall # this used to run depmod -a
+ depmod -a
+ local _daemon
+ for _daemon in "${_daemons[@]}"; do
+ systemctl enable "dgrp_${_daemon}.service"
+ systemctl start "dgrp_${_daemon}.service"
+ done
+ #echo "RealPort (dgrp) startup scripts updated or installed"
+ fi
set +u
}
@@ -33,11 +36,14 @@ post_install() {
pre_upgrade() {
set -u
- for _daemon in daemon; do
- systemctl stop "dgrp_${_daemon}.service"
- systemctl disable "dgrp_${_daemon}.service"
- done
- /usr/bin/dgrp/config/preuninstall
+ if [ ! -d /usr/src/dgrp-*/ ]; then
+ local _daemon
+ for _daemon in "${_daemons[@]}"; do
+ systemctl stop "dgrp_${_daemon}.service"
+ systemctl disable "dgrp_${_daemon}.service"
+ done
+ /usr/bin/dgrp/config/preuninstall
+ fi
set +u
}
@@ -56,9 +62,9 @@ pre_remove() {
post_remove() {
set -u
- mandb -q
+ #mandb -q
systemctl daemon-reload
+ #udevadm control --reload # Seems to work without this
#echo "RealPort (dgrp) startup scripts removed"
set +u
}
-# Automatically generated by dgrp-1.9.36 PKGBUILD from Arch Linux AUR