Skip to content

Commit

Permalink
Restore from TACACS backup if present, upon load-minigraph during upd…
Browse files Browse the repository at this point in the history
…ate-graph action.

Equivalent to master change PR sonic-net#6285
  • Loading branch information
renukamanavalan committed Jan 9, 2021
1 parent abdbda9 commit 0f48782
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions files/image_config/updategraph/updategraph
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

CONFIG_DB_INDEX=4
TACACS_JSON_BACKUP=tacacs.json

reload_minigraph()
{
Expand All @@ -15,6 +16,11 @@ reload_minigraph()
acl-loader update full /etc/sonic/acl.json
fi
config qos reload
if [ -r /etc/sonic/old_config/${TACACS_JSON_BACKUP} ]; then
sonic-cfggen -j /etc/sonic/old_config/${TACACS_JSON_BACKUP} --write-to-db
else
echo "Missing tacacs json to restore tacacs credentials"
fi
DEVICE_TYPE=`sonic-cfggen -m -v DEVICE_METADATA.localhost.type`
if [ "${DEVICE_TYPE}" != "MgmtToRRouter" ]; then
pfcwd start_default
Expand Down

0 comments on commit 0f48782

Please sign in to comment.