Moved and split install of main example config file

This commit is contained in:
Olof hagsand 2023-11-02 17:25:11 +01:00
parent 16a7fa3837
commit c703e89bc8
4 changed files with 16 additions and 26 deletions

View file

@ -45,6 +45,13 @@
## 6.5.0
Expected: December 2023
### API changes on existing protocol/config features
Users may have to change how they access the system
* Moved and split install of main example config file
* From `/usr/local/etc/example.xml` to `/usr/local/etc/clixon/example.xml`
* Added `/usr/local/etc/clixon/example/autocli.xml` and `/usr/local/etc/clixon/example/restconf.xml`
### C/CLI-API changes on existing features
Developers may need to change their code

View file

@ -94,9 +94,7 @@ test: docker
# Special-purpose memory test for snmp
memsnmp: docker
./cleanup.sh ; ./start.sh # kill (ignore error) and the start it
sudo docker exec -t clixon-test bash -c 'sudo apk add --update valgrind; cd /usr/local/bin/test && pattern=test_snmp_union.sh ./mem.sh snmp'
# sudo docker exec -t clixon-test bash -c 'sudo apk add --update valgrind; cd /usr/local/bin/test && pattern=test_snmp*.sh ./mem.sh snmp'
sudo docker exec -t clixon-test bash -c 'sudo apk add --update valgrind; cd /usr/local/bin/test && pattern=test_snmp*.sh ./mem.sh snmp'
depend:

View file

@ -171,12 +171,13 @@ clean:
distclean: clean
rm -f Makefile *~ .depend
install: $(YANGSPECS) $(CLISPECS) $(PLUGINS) $(APPNAME).xml
install: $(YANGSPECS) $(CLISPECS) $(PLUGINS) $(APPNAME).xml restconf.xml autocli.xml
[ -n "$$(getent group "$(CLICON_GROUP)")" ] || groupadd "$(CLICON_GROUP)"
[ -n "$$(getent passwd "$(CLICON_USER)")" ] || useradd -M -s /usr/sbin/nologin -g "$(CLICON_GROUP)" "$(CLICON_USER)"
install -d -m 0755 $(DESTDIR)$(sysconfdir)
install -m 0644 $(APPNAME).xml $(DESTDIR)$(sysconfdir)
# install -m 0644 $(APPNAME).xml $(DESTDIR)$(CLIXON_DEFAULT_CONFIG)
install -d -m 0755 $(DESTDIR)$(sysconfdir)/clixon
install -m 0644 $(APPNAME).xml $(DESTDIR)$(sysconfdir)/clixon
install -m 0644 autocli.xml $(DESTDIR)$(sysconfdir)/clixon
install -m 0644 restconf.xml $(DESTDIR)$(sysconfdir)/clixon
install -d -m 0755 $(DESTDIR)$(datarootdir)/$(APPNAME)/yang
install -d -m 0755 $(DESTDIR)$(YANG_INSTALLDIR)
install -m 0644 $(YANGSPECS) $(DESTDIR)$(YANG_INSTALLDIR)
@ -196,7 +197,7 @@ endif
install -d -m 0775 -g $(CLICON_GROUP) $(DESTDIR)$(localstatedir)/run # This is for PID and SOCK
uninstall:
rm -rf $(DESTDIR)$(sysconfdir)/$(APPNAME).xml
rm -rf $(DESTDIR)$(sysconfdir)/clixon
rm -rf $(DESTDIR)$(datarootdir)/$(APPNAME)
rm -rf $(DESTDIR)$(localstatedir)/$(APPNAME)
rm -rf $(DESTDIR)$(libdir)/$(APPNAME)

View file

@ -1,5 +1,6 @@
<clixon-config xmlns="http://clicon.org/config">
<CLICON_CONFIGFILE>@SYSCONFDIR@/example.xml</CLICON_CONFIGFILE>
<CLICON_CONFIGFILE>@SYSCONFDIR@/clixon/example.xml</CLICON_CONFIGFILE>
<CLICON_CONFIGDIR>@SYSCONFDIR@/clixon/example</CLICON_CONFIGDIR>
<CLICON_FEATURE>ietf-netconf:startup</CLICON_FEATURE>
<CLICON_FEATURE>ietf-netconf:confirmed-commit</CLICON_FEATURE>
<CLICON_FEATURE>clixon-restconf:allow-auth-none</CLICON_FEATURE>
@ -24,21 +25,4 @@
<CLICON_NACM_MODE>disabled</CLICON_NACM_MODE>
<CLICON_STREAM_DISCOVERY_RFC5277>true</CLICON_STREAM_DISCOVERY_RFC5277>
<CLICON_YANG_LIBRARY>false</CLICON_YANG_LIBRARY>
<restconf>
<enable>true</enable>
<auth-type>none</auth-type>
<socket><namespace>default</namespace><address>0.0.0.0</address><port>80</port><ssl>false</ssl></socket>
</restconf>
<autocli>
<module-default>false</module-default>
<list-keyword-default>kw-nokey</list-keyword-default>
<treeref-state-default>false</treeref-state-default>
<edit-mode-default>list container</edit-mode-default>
<completion-default>true</completion-default>
<rule>
<name>include clixon-example</name>
<module-name>clixon-example</module-name>
<operation>enable</operation>
</rule>
</autocli>
</clixon-config>