diff options
author | Fernando Lopez Jr <fernando.lopezjr@gmail.com> | 2019-04-27 04:25:31 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-04-27 04:26:34 +0700 |
commit | 269137c7bf71696e251156f261e8f09e4c4f3b0b (patch) | |
tree | c1e3184664d10bc1430810f3e44e8da22051aaa0 /system/socketcand/doinst.sh | |
parent | b45964b46d74e8b2f81db16c2657aac0eb5976a5 (diff) | |
download | slackbuilds-269137c7bf71696e251156f261e8f09e4c4f3b0b.tar.gz slackbuilds-269137c7bf71696e251156f261e8f09e4c4f3b0b.tar.xz |
system/socketcand: Added (CAN Interfaces Daemon).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/socketcand/doinst.sh')
-rw-r--r-- | system/socketcand/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/system/socketcand/doinst.sh b/system/socketcand/doinst.sh new file mode 100644 index 0000000000..44358298d5 --- /dev/null +++ b/system/socketcand/doinst.sh @@ -0,0 +1,15 @@ +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... +} + +config etc/socketcand.conf.new + |