[TriLUG] e2fsck under cron gets retcode=8 operational error

Aaron Schrab aaron at schrab.com
Wed Sep 19 09:49:36 EDT 2012


At 05:37 -0700 19 Sep 2012, Joseph Mack NA3T <jmack at wm7d.net> wrote:
>o output should be machine readable

At least with df, there is an option for that.  I disagree that that 
should be the default.  Far more people will be looking at the df output 
themselves than will be writing code to parse it; the ones writing that 
code are more likely to read the docs to find options to produce a 
suitable format; and the option to specify the format only needs to be 
put into the code once, not remembered.

>o make best effort. If you don't have a tty, then do the things you 
>can do without a tty.

Doing this would result in a program that requires a tty in some cases, 
but not others.  It may work without a tty in most cases, but require 
one when something unusual happens.  That would make it more likely that 
a script using that tool would be deployed before the problem is found.  
With the tty always being required, the problem should be found early in 
development.

>If an unknown option is given, ignore it, with a warning.

Definitely not.  Warnings are too likely to be ignored.  Also the person 
may have been expecting that unknown option to completely change the 
behaviour of the command.  Consider if someone typed `rm --dry-run -rf 
/`, and rm were to ignore the unsupported --dry-run option; that would 
not be something that's at all helpful.  With a decent shell it's easy 
enough to go back and fix the problem.



More information about the TriLUG mailing list