Репозитории ALT
S: | 1.9.0-alt4 |
5.1: | 1.5.1.1-alt1 |
4.1: | 1.4.3.1-alt1 |
4.0: | 1.4.2-alt1 |
3.0: | 1.2.1-alt1 |
Группа :: Система/Основа
Пакет: pam-config
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
#!/bin/sh
. /etc/control.d/functions
CONFIG1=/etc/pam.d/system-auth
CONFIG2=/etc/pam.d/system-auth-use_first_pass
new_summary "system authentication type"
system_auth_helpstring()
{
case "$1" in
local)
echo "local authentication"
;;
ldap)
echo "authentication via LDAP"
;;
krb5)
echo "authentication via Kerberos 5"
;;
*)
echo "use $1 authentication method"
esac
}
for f in $CONFIG1-*; do
v="${f#$CONFIG1-}"
# ignore *.rpmnew and *.rpmsave
if [ -z "${v##*.rpmsave}" -o -z "${v##*.rpmnew}" ]; then
continue
fi
# check whether both configuration file exist
if [ ! -f "$CONFIG1-$v" -o ! -f "$CONFIG2-$v" ]; then
continue
fi
new_help "$v" "$(system_auth_helpstring $v)"
done
REQUEST="$*"
case "$REQUEST" in
help|'help '*)
control_help "${REQUEST#help}"
;;
list)
control_list
;;
summary)
control_summary
;;
status)
CURRENT="$(readlink -e "$CONFIG1")"
CURRENT="${CURRENT#$CONFIG1-}"
CURRENT="${CURRENT##/*}"
echo "${CURRENT:-unknown}"
;;
*)
if [ ! -f "$CONFIG1-$REQUEST" -o ! -f "$CONFIG2-$REQUEST" ]; then
printf '%s: %s\n' "${0##*/}" "Invalid mode: $REQUEST" >&2
exit 1
fi
ln -sf "${CONFIG1##*/}-$REQUEST" "$CONFIG1"
ln -sf "${CONFIG2##*/}-$REQUEST" "$CONFIG2"
;;
esac