From 14b0b718bd4f70d01f2533f2e35b9039b7a58135 Mon Sep 17 00:00:00 2001 From: Andy Alt Date: Sat, 27 Oct 2018 06:11:33 +0700 Subject: system/rmw: Updated for version 0.4.05. Signed-off-by: Willy Sudiarto Raharjo --- system/rmw/doinst.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 system/rmw/doinst.sh (limited to 'system/rmw/doinst.sh') diff --git a/system/rmw/doinst.sh b/system/rmw/doinst.sh new file mode 100644 index 0000000000000..a8f047556c7c5 --- /dev/null +++ b/system/rmw/doinst.sh @@ -0,0 +1,12 @@ +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/rmwrc.new -- cgit v1.2.3