2017-05-10 13:34:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Warning, problems can occur if the device restarts in the middle of this uci-default script
|
|
|
|
|
|
|
|
if [ -x /bin/sysrepoctl ]; then
|
2020-05-05 18:07:28 +00:00
|
|
|
match=$(sysrepoctl -l | grep "ietf-netconf-notifications ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2020-05-05 18:07:28 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications.yang -p 666
|
2017-05-23 10:46:12 +00:00
|
|
|
fi
|
|
|
|
|
2020-05-05 18:07:28 +00:00
|
|
|
match=$(sysrepoctl -l | grep "ietf-netconf-with-default ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2020-05-05 18:07:28 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-with-defaults.yang -p 666
|
2017-05-23 10:46:12 +00:00
|
|
|
fi
|
|
|
|
|
2020-05-05 18:07:28 +00:00
|
|
|
match=$(sysrepoctl -l | grep "ietf-origin ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2020-05-05 18:07:28 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-origin.yang -p 644
|
2017-05-23 10:46:12 +00:00
|
|
|
fi
|
|
|
|
|
2020-05-05 18:07:28 +00:00
|
|
|
match=$(sysrepoctl -l | grep "sysrepo ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2020-05-05 18:07:28 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/sysrepo.yang -p 600
|
2017-05-23 10:46:12 +00:00
|
|
|
fi
|
|
|
|
|
2017-12-21 10:16:53 +00:00
|
|
|
match=$(sysrepoctl -l | grep "ietf-netconf ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2020-05-05 18:07:28 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf.yang -p 600
|
2017-05-23 10:46:12 +00:00
|
|
|
fi
|
2018-06-26 10:48:02 +00:00
|
|
|
sysrepoctl -m ietf-netconf -e writable-running
|
|
|
|
sysrepoctl -m ietf-netconf -e candidate
|
|
|
|
sysrepoctl -m ietf-netconf -e rollback-on-error
|
|
|
|
sysrepoctl -m ietf-netconf -e validate
|
|
|
|
sysrepoctl -m ietf-netconf -e startup
|
|
|
|
sysrepoctl -m ietf-netconf -e xpath
|
2017-05-10 13:34:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|