Репозитории ALT
S: | 1.21.2-alt1 |
5.1: | 1.6.3-alt10.M50P.1 |
4.1: | 1.6.3-alt3.M41.4 |
4.0: | 1.5.1-alt4.M40.5 |
+updates: | 1.5.1-alt4.M40.5 |
3.0: | 1.4.1-alt1 |
Группа :: Система/Библиотеки
Пакет: krb5
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
./etc/rc.d/init.d/kdcrotate 0000755 0000764 0000764 00000002074 10250620563 013505 0 ustar me me #!/bin/sh
#
# kdcrotate This shell script rotates the list of KDCs in /etc/krb5.conf
#
# Author: Based on SysV Init in RHS Linux by Damien Neil
# Written by Nalin Dahyabhai <nalin@redhat.com>
#
# chkconfig: 345 99 01
#
# description: Rotate the list of KDCs listed in /etc/krb5.conf
#
PATH=/sbin:$PATH
# Only run in runlevels where we're 'enabled', which should only be 345.
if [ "$1" != "start" ] ; then
exit 0
fi
# source function library
. /etc/rc.d/init.d/functions
action "Rotating KDC list" "awk ' /^[[:space:]]*kdc[[:space:]]*=/ { \\
if(length(firstkdc) == 0) { \\
firstkdc = \$0; \\
} else { \\
if(length(kdclist) > 0) { \\
kdclist = kdclist ORS; \\
} \\
kdclist = kdclist \$0; \\
} \\
next; \\
} \\
{ \\
if(length(kdclist) > 0) { \\
NEWCONFIG = NEWCONFIG kdclist ORS; \\
} \\
if(length(firstkdc) > 0) { \\
NEWCONFIG = NEWCONFIG firstkdc ORS; \\
} \\
firstkdc = \"\"; \\
kdclist = \"\"; \\
NEWCONFIG = NEWCONFIG \$0 ORS; \\
} \\
END {printf \"%s\", NEWCONFIG > \"/etc/krb5.conf\"}' /etc/krb5.conf"