Hi

In httpd.conf, I'm trying to convert a block like this:

    Order allow,deny      ->     Order deny,allow
    Allow from all        ->     deny from all
                          ->     allow from 10.1.1.0/24

This is simple enough using fixed positions:

defvar c /files/etc/httpd/conf/httpd.conf
set $c/Directory[2]/directive[3]/arg "deny,allow"
set $c/Directory[2]/directive[4] "deny"
set $c/Directory[2]/directive[5] "allow"
set $c/Directory[2]/directive[5]/arg[1] "from"
set $c/Directory[2]/directive[5]/arg[2] "10.1.1.0/24"

But this will be wrong if another directive is inserted before these
so I need to define the positions relative to the first.  The first
is easy:

set "$c/Directory[2]/directive[.  = 'Order']/arg" deny,allow

Everything I've tried for the position after that either gets an
error or adds a new setting in the wrong place.

Is there any way to define a position relative to another?


Thanks
--
Ian

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to