2017-05-10 13:35:06 +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 11:41:02 +00:00
|
|
|
match=$(sysrepoctl -l | grep "ietf-keystore ")
|
2017-05-23 10:46:36 +00:00
|
|
|
if [ ! "$match" ]; then
|
2017-12-21 11:41:02 +00:00
|
|
|
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
|
2017-05-23 10:46:36 +00:00
|
|
|
if [ -x /bin/sysrepocfg ]; then
|
|
|
|
sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
|
|
|
|
rm /usr/share/netopeer2-keystored/stock_key_config.xml
|
|
|
|
fi
|
|
|
|
fi
|
2017-05-10 13:35:06 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|