summaryrefslogtreecommitdiffstats
path: root/net/Netopeer2/files/netopeer2-keystored.default
blob: 5257e53486c667afe98006287755db3cd0d532bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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-keystore ")
	if [ ! "$match" ]; then
		sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
		if [ -x /bin/sysrepocfg ]; then
			sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
			rm /usr/share/netopeer2-keystored/stock_key_config.xml
		fi
	fi
fi

exit 0