Greetings,

I'd like to to be able to parse an ifcfg file that contains a function using
shellvars.aug. This doesn't seem to be supported currently.

Here's an example of the ifcfg file:

================ begin ifcfg-eth0 =================
# VMware VMXNET3 Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.10.91
NETMASK=255.255.255.0

check_link_down() {
 return 1;
}
================ end ifcfg-eth0 =================

I took a stab at patching shellvars.aug, but I'm stuck with the following
error...

[r...@s-rhel-server-54-64 dist]# augtool ls
/files/etc/sysconfig/network-scripts/ifcfg-eth0
#comment = VMware VMXNET3 Ethernet Controller
DEVICE = eth0
BOOTPROTO = static
ONBOOT = yes
IPADDR = 192.168.10.91
NETMASK = 255.255.255.0
error: Invalid path expression
error: garbage at end of path expression
error:
/files/etc/sysconfig/network-scripts/ifcfg-eth0/check_link_down(|=|)/*
error: Invalid path expression
error: garbage at end of path expression
error: /files/etc/sysconfig/network-scripts/ifcfg-eth0/check_link_down(|=|)
check_link_down()/ = 255.255.255.0

If anyone has advice on the error or would be willing to open a ticket on
the bug/feature, I would appreciate it.

Thanks very much.

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

Reply via email to