slackbuilds_ponce/system/sargon/doinst.sh
Sergey Poznyakoff 7f8489d5ef
system/sargon: Added (User privilege system for docker).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2019-12-01 08:09:33 +07:00

14 lines
381 B
Bash

#! /bin/sh
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/rc.d/rc.sargon.new