diff options
author | Mislav Novakovic <mislav.novakovic@sartura.hr> | 2017-05-23 12:46:12 +0200 |
---|---|---|
committer | Mislav Novakovic <mislav.novakovic@sartura.hr> | 2017-05-24 16:04:55 +0200 |
commit | f6aa981a5662f2305ce692437459fe01bee0a8ed (patch) | |
tree | afd3460c092a2e9fbd6582c27d463fc147aa1e21 /net/sysrepo | |
parent | 85259eccee5491f459c223f3475a9d507763276c (diff) |
sysrepo: modified uci-default script
Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
Diffstat (limited to 'net/sysrepo')
-rw-r--r-- | net/sysrepo/files/libsysrepo.default | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/net/sysrepo/files/libsysrepo.default b/net/sysrepo/files/libsysrepo.default index 4e00cc79f..ae2af81f8 100644 --- a/net/sysrepo/files/libsysrepo.default +++ b/net/sysrepo/files/libsysrepo.default @@ -3,11 +3,30 @@ # Warning, problems can occur if the device restarts in the middle of this uci-default script if [ -x /bin/sysrepoctl ]; then - sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang -p 644 - sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications.yang -p 600 - sysrepoctl --install --yang=/etc/sysrepo/yang/nc-notifications.yang -p 666 - sysrepoctl --install --yang=/etc/sysrepo/yang/notifications.yang -p 666 - sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang -p 600 + match=$(sysrepoctl -l | grep "ietf-netconf-acm\ ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang -p 644 + fi + + match=$(sysrepoctl -l | grep "ietf-netconf-notifications\ ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications.yang -p 600 + fi + + match=$(sysrepoctl -l | grep "nc-notifications\ ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/nc-notifications.yang -p 666 + fi + + match=$(sysrepoctl -l | grep "notifications\ ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/notifications.yang -p 666 + fi + + match=$(sysrepoctl -l | grep "ietf-netconf\ ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang -p 600 + fi fi exit 0 |