diff options
author | Jan F. Chadima <jfch@jagda.eu> | 2018-07-28 00:02:20 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-07-28 08:51:48 +0700 |
commit | e94ee23d320f1b337481b4742b80da97a917a3d8 (patch) | |
tree | cb53d169445545cf94595e8f1015747f0d281288 /system/elo-mt-usb/doinst.sh | |
parent | 5257366819a23081dc3a7919d50e29348a816240 (diff) |
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.sh | 29 |
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 0000000000000..9ea0e9e46d28b --- /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 |