From f5c6651da8c716965c052ae00624a143bb6027e5 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Wed, 18 May 2016 13:49:17 +1000 Subject: Add support for rc.conf(5) initialisation. Provide user support for rc.conf(5) so a user can create a suitable /etc/rc.conf file to initialise libbsd. This patch by default adds basic networking support: cloned_interfaces ifconfig_'interface' defaultrouter hostname Refer to FreeBSD documentation for examples. Users can make a single call to have /etc/rc.conf processed, or pass a file name to a specific configuration file or a text string with line feeds can be passed to the scripting version of the interface. The rc.conf support is implemented in terms of directive handlers that are called based on a regular expression. The design allows new handlers to be added as needed. Line concatenation is still to be implemented. --- libbsd.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libbsd.py') diff --git a/libbsd.py b/libbsd.py index a6a0ff0f..3d452290 100755 --- a/libbsd.py +++ b/libbsd.py @@ -63,6 +63,8 @@ def rtems(mm): 'rtems/rtems-bsd-get-mac-address.c', 'rtems/rtems-bsd-get-task-priority.c', 'rtems/rtems-bsd-get-task-stack-size.c', + 'rtems/rtems-bsd-rc-conf-net.c', + 'rtems/rtems-bsd-rc-conf.c', 'rtems/rtems-bsd-shell.c', 'rtems/rtems-bsd-shell-netcmds.c', 'rtems/rtems-bsd-syscall-api.c', @@ -2449,6 +2451,7 @@ def tests(mm): mod.addTest(mm.generator['test']('vlan01', ['test_main'], netTest = True)) mod.addTest(mm.generator['test']('lagg01', ['test_main'], netTest = True)) mod.addTest(mm.generator['test']('log01', ['test_main'])) + mod.addTest(mm.generator['test']('rcconf01', ['test_main'])) return mod # -- cgit v1.2.3