diff options
author | Ozan Türkyılmaz <ozan.turkyilmaz@gmail.com> | 2010-10-18 22:34:15 -0500 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-10-20 10:50:23 -0500 |
commit | c6fd0d7eea61f9b26d0020a47b628b17f3f0fcfd (patch) | |
tree | 420a47e519ff6236f0c9e22011be21ab6af14353 /system/prelink/doinst.sh | |
parent | b760f054f3006aa6393ab8e7497c0c0767f56f5a (diff) |
system/prelink: Added (ELF prelinking utility)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/prelink/doinst.sh')
-rw-r--r-- | system/prelink/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/prelink/doinst.sh b/system/prelink/doinst.sh new file mode 100644 index 0000000000000..89a59bac84bcf --- /dev/null +++ b/system/prelink/doinst.sh @@ -0,0 +1,14 @@ +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/prelink.conf.new |