mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
Netopeer2: update to 0.6-r1
PR includes switch to codeload tarballs and rename from netopeer2 to Netopeer2 for better codeload integration. Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
#!/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 -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
|
||||
rm /usr/share/netopeer2-keystored/stock_key_config.xml
|
||||
fi
|
||||
|
||||
#generate ssh keys
|
||||
ssh-keygen -t rsa -f /tmp/ssh_host_rsa_key -N ""
|
||||
openssl rsa -in /tmp/ssh_host_rsa_key -outform pem > /etc/keystored/keys/ssh_host_rsa_key.pem
|
||||
openssl rsa -pubout -in /etc/keystored/keys/ssh_host_rsa_key.pem -out /etc/keystored/keys/ssh_host_rsa_key.pub.pem
|
||||
rm /tmp/ssh_host_rsa_key
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/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 -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
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/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-ssh-server ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang -p 600
|
||||
fi
|
||||
|
||||
match=$(sysrepoctl -l | grep "ietf-tls-server ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang -p 600
|
||||
fi
|
||||
|
||||
match=$(sysrepoctl -l | grep "iana-crypt-hash ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600
|
||||
fi
|
||||
|
||||
match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600
|
||||
fi
|
||||
|
||||
match=$(sysrepoctl -l | grep "ietf-netconf-server ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang -o root:root -p 600
|
||||
sysrepoctl -m ietf-netconf-server -e listen
|
||||
sysrepoctl -m ietf-netconf-server -e ssh-listen
|
||||
if [ -x /bin/sysrepocfg ]; then
|
||||
sysrepocfg -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
|
||||
rm /usr/share/netopeer2-server/stock_config.xml
|
||||
fi
|
||||
fi
|
||||
|
||||
match=$(sysrepoctl -l | grep "ietf-netconf-monitoring ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang -o root:root -p 600
|
||||
fi
|
||||
|
||||
match=$(sysrepoctl -l | grep "ietf-netconf-with-defaults ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang -o root:root -p 600
|
||||
fi
|
||||
|
||||
match=$(sysrepoctl -l | grep "ietf-system ")
|
||||
if [ ! "$match" ]; then
|
||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system@2014-08-06.yang -o root:root -p 600
|
||||
sysrepoctl -m ietf-system -e authentication
|
||||
sysrepoctl -m ietf-system -e local-users
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=11
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/bin/netopeer2-server
|
||||
|
||||
start_service() {
|
||||
|
||||
PERSIST_FILE=/etc/sysrepo/data/ietf-keystore.persist
|
||||
|
||||
while [ ! -f $PERSIST_FILE ]
|
||||
do
|
||||
echo "no persist file yet"
|
||||
sleep 3
|
||||
done
|
||||
|
||||
RETRY_CNT=5
|
||||
LAST_LINE=$(tail -n1 $PERSIST_FILE)
|
||||
|
||||
while [[ -f $PERSIST_FILE && $LAST_LINE != "</module>" ]]
|
||||
do
|
||||
sleep 1
|
||||
|
||||
echo "$RETRY_CNT: $LAST_LINE"
|
||||
LAST_LINE=$(tail -n1 $PERSIST_FILE)
|
||||
RETRY_CNT=$(($RETRY_CNT-1))
|
||||
|
||||
if [ $RETRY_CNT -le 0 ];
|
||||
then
|
||||
rm $PERSIST_FILE
|
||||
RETRY_CNT=5
|
||||
fi
|
||||
done
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG
|
||||
procd_append_param command -d -v 0
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service()
|
||||
{
|
||||
service_stop ${PROG}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
|
||||
<listen>
|
||||
<endpoint>
|
||||
<name>test_ssh_listen_endpt</name>
|
||||
<ssh>
|
||||
<address>::</address>
|
||||
<port>830</port>
|
||||
<host-keys>
|
||||
<host-key>
|
||||
<name>test_ssh_listen_key</name>
|
||||
<public-key>ssh_host_rsa_key</public-key>
|
||||
</host-key>
|
||||
</host-keys>
|
||||
</ssh>
|
||||
</endpoint>
|
||||
</listen>
|
||||
</netconf-server>
|
||||
Reference in New Issue
Block a user