"John R. Shannon" <john@johnrshannon.com> writes:
> Is something missing in etcupdate?
Well, it would be nice if it worked. ;-) It never has, for me, and
I've not been able to figure out why. (It must be said, though, that
I haven't spent more than a half hour studying the failing code.) The
problem is in sdiff, which always reports failure, even when it does
exactly what it should:
ask:tih> cat > foo
1
2
3
ask:tih> cat > bar
1
4
3
ask:tih> sdiff -o baz foo bar
1 1
2 | 4
%l
3 3
sdiff: subsidiary program `ed' failed
ask:tih> cat baz
1
2
3
ask:tih> sdiff -o baz foo bar
1 1
2 | 4
%r
3 3
sdiff: subsidiary program `ed' failed
ask:tih> cat baz
1
4
3
ask:tih>_
It works great, but wrongly reports an error, and this causes
etcupdate to fail to do the right thing. The relevant code in sdiff
was sufficiently dense that I decided, after staring at it for a bit,
that I'd rather get by without etcupdate.
Additionally, sdiff uses the EDITOR environment variable to decide
which editor to use to run the script it generates specifically for
ed(1), and that can't be right. (I've unset EDITOR for the above
example, but on the first run, the error message was the same, with
`emacs' named instead of `ed'. Interestingly, the output file came
out exactly right then, too.)
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway
www.eunet.no T: +47-22092958 M: +47-93013940 F: +47-22092901