#!/bin/bash
# **** License ****
# Copyright (c) 2019, AT&T Intellectual Property. All rights reserved.
#
# Copyright (c) 2014-2016 by Brocade Communications Systems, Inc.
# All rights reserved.
#
# This code was originally developed by Vyatta, Inc.
# Copyright (C) 2007-2010 Vyatta, Inc.
# All Rights Reserved.
#
# SPDX-License-Identifier: GPL-2.0-only
#
# Description:  Vyatta PAM Radius Authentication Pre-configuration.
#
# **** End License ****

# restore PAM back to virgin state (no radius other services)
rm -f /etc/pam_radius_auth.conf

if grep -q radius /etc/pam.d/common-auth
then
    pam-auth-update --package --remove radius
    rm /usr/share/pam-configs/radius
fi
