summaryrefslogtreecommitdiff
path: root/network/openssh-krb5/doinst.sh
diff options
context:
space:
mode:
authorLeigh Wedding <leigh.wedding@telstra.com>2011-12-16 08:47:57 -0600
committerNiels Horn <niels.horn@slackbuilds.org>2011-12-18 00:07:51 -0200
commit96ba3e010ec77a2d96ab314aa3f95fabf2afa46b (patch)
treed1c41b5425d0e8dde11f7491e0d19a1cd7f2129c /network/openssh-krb5/doinst.sh
parent382b791d69ad4446c0534ab811951ea66bc92811 (diff)
downloadslackbuilds-96ba3e010ec77a2d96ab314aa3f95fabf2afa46b.tar.gz
network/openssh-krb5: Added (Kerberos-enabled OpenSSH)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/openssh-krb5/doinst.sh')
-rw-r--r--network/openssh-krb5/doinst.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/network/openssh-krb5/doinst.sh b/network/openssh-krb5/doinst.sh
new file mode 100644
index 0000000000..18db6dbc1e
--- /dev/null
+++ b/network/openssh-krb5/doinst.sh
@@ -0,0 +1,26 @@
+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...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.sshd.krb5.new
+