b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Warning, problems can occur if the device restarts in the middle of this uci-default script |
| 4 | |
| 5 | if [ -x /bin/sysrepoctl ]; then |
| 6 | match=$(sysrepoctl -l | grep "ietf-netconf-notifications ") |
| 7 | if [ ! "$match" ]; then |
| 8 | sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications.yang -p 666 |
| 9 | fi |
| 10 | |
| 11 | match=$(sysrepoctl -l | grep "ietf-netconf-with-default ") |
| 12 | if [ ! "$match" ]; then |
| 13 | sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-with-defaults.yang -p 666 |
| 14 | fi |
| 15 | |
| 16 | match=$(sysrepoctl -l | grep "ietf-origin ") |
| 17 | if [ ! "$match" ]; then |
| 18 | sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-origin.yang -p 644 |
| 19 | fi |
| 20 | |
| 21 | match=$(sysrepoctl -l | grep "sysrepo ") |
| 22 | if [ ! "$match" ]; then |
| 23 | sysrepoctl --install --yang=/etc/sysrepo/yang/sysrepo.yang -p 600 |
| 24 | fi |
| 25 | |
| 26 | match=$(sysrepoctl -l | grep "ietf-netconf ") |
| 27 | if [ ! "$match" ]; then |
| 28 | sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf.yang -p 600 |
| 29 | fi |
| 30 | sysrepoctl -m ietf-netconf -e writable-running |
| 31 | sysrepoctl -m ietf-netconf -e candidate |
| 32 | sysrepoctl -m ietf-netconf -e rollback-on-error |
| 33 | sysrepoctl -m ietf-netconf -e validate |
| 34 | sysrepoctl -m ietf-netconf -e startup |
| 35 | sysrepoctl -m ietf-netconf -e xpath |
| 36 | fi |
| 37 | |
| 38 | exit 0 |