At 2000-05-26 07:29 -0700, Jeff A. Bowles wrote:
There's a standard utility that was present for a long while
(might still be there) on many Unix machines: "vipw" (and "edpw")
for editing the password file. Its job was to put a "lock file" in
place, change permissions, make backup files, etc.
Why not swipe that idea: "editsysfile passwd" would edit the
password file, making its permissions appropriate for a "p4 edit"
operation, doing "p4 edit", then dumping you into $EDITOR on the
file, then checking in the change and setting the permissions back.
(It could use its argument to know which file you're touching,
so 'editsysfile motd' would do the appropriate thing, for example.)
Thanks, that helps for editing, but sadly it doesn't help us with our
second and third goals:
- restore after failure
- move configuration from one piece of hardware to another
This is a bit like the Apple resource fork problem. On any system
there's always some system-specific meta-information that's separate
from the file contents.