[augeas-devel] The save does nothing

makkalot at gmail.com makkalot at gmail.com
Mon May 19 13:18:29 UTC 2008


Hi again sorry for the delay , i hope we solve my problem :)
> Cool .. out ofcuriosity, what will the tool do ?

You probably know it , it is func network automation tool (i'm a gsoc student) 
and we want to be able to edit conf files of the remote machines easily so we 
will write a wrapper that does all that stuff

>
> If you still have trouble getting augtool to make changes, post how you
Yes i still have trouble shame on me :) 
> invoke augtool (ie., the exact command line) and the commands you issued
> inside augtool.
>

Her is the commands i executed :

[makkalot at localhost func-prepare]$ whoami
makkalot
[makkalot at localhost func-prepare]$ mkdir augeas-root
[makkalot at localhost func-prepare]$ cp -R augeas-0.1.1/tests/root/etc/ 
augeas-root/
[makkalot at localhost func-prepare]$ export AUGEAS_ROOT=augeas-root
[makkalot at localhost func-prepare]$ echo $AUGEAS_ROOT
augeas-root
[makkalot at localhost func-prepare]$ cd augeas-root
[makkalot at localhost augeas-root]$ ls
etc
[makkalot at localhost augeas-root]$ cd ..
[makkalot at localhost func-prepare]$ chown -R $USER $AUGEAS_ROOT
[makkalot at localhost func-prepare]$ cd augeas-root/
[makkalot at localhost augeas-root]$ ls
etc
[makkalot at localhost augeas-root]$ augtool -b
augtool> set /files/etc/hosts/10000/ipaddr 192.168.0.1
augtool> set /files/etc/hosts/10000/canonical pigiron.example.com
augtool> set /files/etc/hosts/10000/alias[1] pigiron
augtool> set /files/etc/hosts/10000/alias[2] piggy
augtool> save
augtool> print
/augeas
/augeas/root = "augeas-root/"
/augeas/save = "backup"
/files
/files/etc
/files/etc/hosts
/files/etc/hosts/10000
/files/etc/hosts/10000/ipaddr = "192.168.0.1"
/files/etc/hosts/10000/canonical = "pigiron.example.com"
/files/etc/hosts/10000/alias[1] = "pigiron"
/files/etc/hosts/10000/alias[2] = "piggy"
augtool> exit
[makkalot at localhost augeas-root]$ ls
etc
[makkalot at localhost augeas-root]$ cd etc/
[makkalot at localhost etc]$ ls
aliases  apt  cmfm.conf  dhcpd.conf  fstab  grub.conf  hosts  inittab  pam.d  
ssh  sysconfig  xinetd.conf  xinetd.d  yum.conf  yum.repos.d
[makkalot at localhost etc]$ ls -la
total 140
drwxrwxr-x 8 makkalot makkalot 4096 2008-05-19 16:08 .
drwxrwxr-x 3 makkalot makkalot 4096 2008-05-19 16:08 ..
-rw-rw-r-- 1 makkalot makkalot  740 2008-05-19 16:08 aliases
drwxrwxr-x 3 makkalot makkalot 4096 2008-05-19 16:08 apt
-rw-rw-r-- 1 makkalot makkalot 7607 2008-05-19 16:08 cmfm.conf
-rw-r--r-- 1 makkalot makkalot 4086 2008-05-19 16:08 dhcpd.conf
-rw-rw-r-- 1 makkalot makkalot  760 2008-05-19 16:08 fstab
-rw-r--r-- 1 makkalot makkalot 1025 2008-05-19 16:08 grub.conf
-rw-r--r-- 1 makkalot makkalot  309 2008-05-19 16:08 hosts
-rw-r--r-- 1 makkalot makkalot 1663 2008-05-19 16:08 inittab
drwxrwxr-x 2 makkalot makkalot 4096 2008-05-19 16:08 pam.d
drwxrwxr-x 2 makkalot makkalot 4096 2008-05-19 16:08 ssh
drwxrwxr-x 3 makkalot makkalot 4096 2008-05-19 16:08 sysconfig
-rw-rw-r-- 1 makkalot makkalot 1001 2008-05-19 16:08 xinetd.conf
drwxrwxr-x 2 makkalot makkalot 4096 2008-05-19 16:08 xinetd.d
-rw-rw-r-- 1 makkalot makkalot  252 2008-05-19 16:08 yum.conf
drwxrwxr-x 2 makkalot makkalot 4096 2008-05-19 16:08 yum.repos.d
[makkalot at localhost etc]$ vim hosts
[makkalot at localhost etc]$ hosts.augsave
bash: hosts.augsave: command not found
[makkalot at localhost etc]$ vim hosts.augsave
[makkalot at localhost etc]$   

I dont see any files that are modified by augtool what i'm doing wrong ? I 
think it is something easy and stupid but couldnt find it sorry :)




More information about the augeas-devel mailing list