[rc.local]: Copy saved minigraph if available. (#533)
* [rc.local]: Copy saved minigraph if available. In case of sonic-to-sonic update old image stores minigraph under /host directory. Upon first boot this minigraph will be used by new image to save configuration. Signed-off-by: marian-pritsak <marianp@mellanox.com>
This commit is contained in:
parent
147b89fa43
commit
d597418b6c
@ -29,7 +29,12 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/
|
||||
# Try to take minigraph saved during installation
|
||||
if [ -f /host/minigraph.xml ]; then
|
||||
mv /host/minigraph.xml /etc/sonic/
|
||||
else
|
||||
cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/
|
||||
fi
|
||||
|
||||
if [ -d /host/image-$sonic_version/platform/$platform ]; then
|
||||
dpkg -i /host/image-$sonic_version/platform/$platform/*.deb
|
||||
|
Reference in New Issue
Block a user