On Wednesday 08 September 2010 08:50:29 martin f krafft wrote:
> Augtool insists on writing to the filesystem, even if it does not
> need to make any changes. For instance, the following fails because
> /etc is mounted read-only, and hence /etc/ssh/sshd_config.augnew
> cannot be written (strace attached):

For the record, sshd_config.augnew is not a temporary file. This file will be 
written with whatever change you make. Augtool man page specifies this 
behavior with the '-n' option:

       -n  Save changes in files with extension '.augnew', do not 
           modify the original files

>   augtool> print /files/etc/ssh/sshd_config/PermitRootLogin
>   /files/etc/ssh/sshd_config/PermitRootLogin = "without-password"
>   augtool> set /files/etc/ssh/sshd_config/PermitRootLogin without-password

And here, you use a command that actually changes the configuration (well, 
usually, not really in this case ...).
 
>   augtool> print /files/etc/ssh/sshd_config/PermitRootLogin
>   /files/etc/ssh/sshd_config/PermitRootLogin = "without-password"
>   augtool> save
>   Saving failed

I guess that Augtool could be improved not to save the file since you did not 
actually change its semantic content. But you did ask for a save ...

> Please use a temporary directory for writing temporary files.

[ /me thinks that we'll get similar problems witf config-edit-sshd, but I 
digress ... ]

By the way, what happens in your use case if the content of sshd_config is 
*actually* changed ? If /etc is read-only, any change will be lost. So what's 
the point of using augtool on a read-only file-system ?

All the best

Dominique
--
http://config-model.wiki.sourceforge.net/ -o- http://search.cpan.org/~ddumont/
http://www.ohloh.net/accounts/ddumont     -o- http://ddumont.wordpress.com/



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to