packages/net/sysrepo/files/libsysrepo.default
Mislav Novakovic 317d897d44 sysrepo: bump to latest version
This patche renames the yang files so sysrepoctl does not create
duplicates.

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
2017-12-21 12:43:10 +01:00

32 lines
1,000 B
Bash

#!/bin/sh
# Warning, problems can occur if the device restarts in the middle of this uci-default script
if [ -x /bin/sysrepoctl ]; then
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@2012-02-06..yang -p 600
fi
match=$(sysrepoctl -l | grep "nc-notifications ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/nc-notifications@2008-07-14.yang -p 666
fi
match=$(sysrepoctl -l | grep "notifications ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/notifications@2008-07-14.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