* [Need an option to disable restconf mandatory action of overwriting startup_db #230](https://github.com/clicon/clixon/issues/230)

* Disable RFC 8040 mandatory copy of running to startup after commit
* Rename CLICON_RESTCONF_INSTALL_DIR -> CLICON_RESTCONF_INSTALLDIR
This commit is contained in:
Olof hagsand 2021-05-25 11:07:41 +02:00
parent 60c9172d21
commit 5b39418e92
8 changed files with 53 additions and 25 deletions

View file

@ -68,7 +68,7 @@ cat <<EOF > $cfg
<CLICON_BACKEND_DIR>/usr/local/lib/$APPNAME/backend</CLICON_BACKEND_DIR>
<CLICON_BACKEND_REGEXP>example_backend.so$</CLICON_BACKEND_REGEXP>
<CLICON_RESTCONF_DIR>/usr/local/lib/$APPNAME/restconf</CLICON_RESTCONF_DIR>
<CLICON_RESTCONF_INSTALL_DIR>$RESTCONFDIR</CLICON_RESTCONF_INSTALL_DIR>
<CLICON_RESTCONF_INSTALLDIR>$RESTCONFDIR</CLICON_RESTCONF_INSTALLDIR>
<CLICON_CLI_DIR>/usr/local/lib/$APPNAME/cli</CLICON_CLI_DIR>
<CLICON_CLI_MODE>$APPNAME</CLICON_CLI_MODE>
<CLICON_SOCK>/usr/local/var/$APPNAME/$APPNAME.sock</CLICON_SOCK>
@ -194,15 +194,15 @@ ps aux|grep clixon_ # XXX
new "Check $pid1 exists"
# Here backend dies / is killed
#while sudo kill -0 $pid1 2> /dev/null; do
if sudo kill -0 $pid1; then # XXX
# if sudo kill -0 $pid1; then # XXX
while sudo kill -0 $pid1 2> /dev/null; do
new "kill $pid1 externally"
sudo kill $pid1
sleep 1 # There is a race condition here when restconf is killed while waiting for reply from backend
echo "pid1:$pid1" # XXX
ps aux|grep clixon_ # XXX
fi
#done
done
# fi
echo "pid1:$pid1" # XXX
ps aux|grep clixon_ # XXX