diff options
author | Wayne Cuddy <wcuddy@gmail.com> | 2019-04-01 08:17:53 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-04-05 07:38:33 +0700 |
commit | 2dce8073c6e06875fd06607c330a53e05f41ea43 (patch) | |
tree | 2ab942c0930ffcf64f2b86a1d787f8f0e36a75fa /system/freeipmi/doinst.sh | |
parent | bf1993b7f3385e6a3037a7134cbb24b85424b3fe (diff) |
system/freeipmi: Added (system management).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/freeipmi/doinst.sh')
-rw-r--r-- | system/freeipmi/doinst.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/system/freeipmi/doinst.sh b/system/freeipmi/doinst.sh new file mode 100644 index 000000000000..fe318696f231 --- /dev/null +++ b/system/freeipmi/doinst.sh @@ -0,0 +1,22 @@ + +config() { + NEW="$1" + OLD="${1%.new}" + if [ ! -r $OLD ]; + then + # If there's no config file by that name, mv it over: + mv $NEW $OLD + elif [ "$(md5sum <$OLD)" = "$(md5sum <$NEW)" ]; + then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# doinst.sh reads the list of files from ./install/conffiles at install time. +# ./install/conffiles was generated at build time/ +for cf in $(cat install/conffiles) +do + config $cf.new +done |