blob: 4158041929c589d2d0c0da2a22a0f051fc312ec6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/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-notifications ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications.yang -p 666
fi
match=$(sysrepoctl -l | grep "ietf-netconf-with-default ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-with-defaults.yang -p 666
fi
match=$(sysrepoctl -l | grep "ietf-origin ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-origin.yang -p 644
fi
match=$(sysrepoctl -l | grep "sysrepo ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/sysrepo.yang -p 600
fi
match=$(sysrepoctl -l | grep "ietf-netconf ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf.yang -p 600
fi
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
fi
exit 0
|