summaryrefslogtreecommitdiffstats
path: root/system/elo-mt-usb/doinst.sh
diff options
context:
space:
mode:
author Jan F. Chadima2018-07-28 01:02:20 +0200
committer Willy Sudiarto Raharjo2018-07-28 03:51:48 +0200
commite94ee23d320f1b337481b4742b80da97a917a3d8 (patch)
treecb53d169445545cf94595e8f1015747f0d281288 /system/elo-mt-usb/doinst.sh
parent5257366819a23081dc3a7919d50e29348a816240 (diff)
downloadslackbuilds-e94ee23d320f1b337481b4742b80da97a917a3d8.tar.gz
system/elo-mt-usb: Added (elo USB multitouch controller driver).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/elo-mt-usb/doinst.sh')
-rw-r--r--system/elo-mt-usb/doinst.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/system/elo-mt-usb/doinst.sh b/system/elo-mt-usb/doinst.sh
new file mode 100644
index 0000000000..9ea0e9e46d
--- /dev/null
+++ b/system/elo-mt-usb/doinst.sh
@@ -0,0 +1,29 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.elo-mt-usb.new
+config etc/elo/eloconfig.new
+rm -f etc/elo/eloconfig.new
+
+chroot . /sbin/modprobe