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
|
2017-12-21 10:16:53 +00:00
|
|
|
match=$(sysrepoctl -l | grep "ietf-netconf-acm ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang -p 644
|
|
|
|
fi
|
|
|
|
|
2017-12-21 10:16:53 +00:00
|
|
|
match=$(sysrepoctl -l | grep "ietf-netconf-notifications ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2017-12-21 10:16:53 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06..yang -p 600
|
2017-05-23 10:46:12 +00:00
|
|
|
fi
|
|
|
|
|
2017-12-21 10:16:53 +00:00
|
|
|
match=$(sysrepoctl -l | grep "nc-notifications ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2017-12-21 10:16:53 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/nc-notifications@2008-07-14.yang -p 666
|
2017-05-23 10:46:12 +00:00
|
|
|
fi
|
|
|
|
|
2017-12-21 10:16:53 +00:00
|
|
|
match=$(sysrepoctl -l | grep "notifications ")
|
2017-05-23 10:46:12 +00:00
|
|
|
if [ ! "$match" ]; then
|
2017-12-21 10:16:53 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/notifications@2008-07-14.yang -p 666
|
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
|
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang -p 600
|
|
|
|
fi
|
2017-05-10 13:34:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|