On 17/12/12 15:00, Jens Hoffmann wrote: > I need to add interfaces (eth0, eth1, ...) one at a time to INTERFACES in > /etc/default/isc-dhcp-server like so: > > set /files/etc/default/isc-dhcp-server/INTERFACES/value[last()+1] eth0 > set /files/etc/default/isc-dhcp-server/INTERFACES/value[last()+1] eth1 > ....
Are you using augtool for your application, or one of the APIs, or Puppet? > But /etc/default/isc-dhcp-server is parsed by shellvars.aug that only > allows to issue commands like: > > > set /files/etc/default/isc-dhcp-server/INTERFACES "\"eth0 eth1 ...\"" > > > > I tried to overcome this limitation with my own module that uses the lense > defined > in shellvars_list.aug and solely includes "/etc/default/isc-dhcp-server". But > then > neither the shellvars module nor my own one applies to the dhcp configuration > file: > the configuration file is left ignored without any error messages. Did you check for errors with "print /augeas//error"? augtool will only print and halt on fatal errors. I would expect your solution to fail, as Augeas should see that two modules are attempting to load the same file (there's no concept of precedence). Instead, you should disable autoloading and explicitly load the file with the lens you want: $ augtool --noautoload augtool> set /augeas/load/Shellvars_list/lens Shellvars_list.lns augtool> set /augeas/load/Shellvars_list/incl /etc/default/isc-dhcp-server augtool> load The APIs also support this mode using the AUG_NO_MODL_AUTOLOAD flag. -- Dominic Cleal Red Hat Engineering -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org