Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37044019
en ru br
ALT Linux repos
S:1.9.0-alt4
5.0: 1.4.5.1-alt1
4.1: 1.4.3.1-alt1
4.0: 1.4.2-alt1
3.0: 1.2.1-alt1

Group :: System/Base
RPM: pam-config

 Main   Changelog   Spec   Patches   Sources   Download   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"

new_help local "local authentication"
new_help ldap "authentication via LDAP"

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
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin