augtool> errors
Error in /etc/libvirt/qemu.conf:289.0 (parse_failed)
Iterated lens matched less than it should
Lens: /usr/share/augeas/lenses/libvirtd_qemu.aug:101.13-.43:
Last matched: /usr/share/augeas/lenses/libvirtd_qemu.aug:97.17-.31:
Error in /etc/sysconfig/network-scripts/ifcfg-eth2:11.0 (parse_failed)
Syntax error
Lens: /usr/share/augeas/lenses/dist/shellvars.aug:194.12-.60:
git clone https://github.com/hercules-team/augeas.git
cd augeas
./autogen.sh
./configure
make && make install
不过,在Red Hat/CentOS系统中,默认已经安装了 ``
在 /etc/hosts中添加内容
set /files/etc/hosts/01/ipaddr 192.168.0.1
set /files/etc/hosts/01/canonical pigiron.example.com
set /files/etc/hosts/01/alias[1] pigiron
set /files/etc/hosts/01/alias[2] piggy
save
此时在/tmp/augeas-sandbox/etc/hosts可以看到添加了一行记录
192.168.0.1 pigiron.example.com pigiron piggy
修改 /etc/grub.conf
augeas可以简化grub.conf配置方法,抽象出容易修改对象
set /files/etc/grub.conf/default 1
rm /files/etc/grub.conf/title[3]
save