On Wednesday 24 February 2010 12:16:24 Paweł Hajdan, Jr. wrote:
> While you're touching this, could you improve this part a bit:
>
> # maybe the user is screwing around with perms they shouldnt #289168
> if [[ ! -r ${base} ]] ; then
> eerror "Unable to read ${base} -- perms are screwed ?"
> die "fix your system"
> fi
>
> I understand frustration caused by weird things people are doing with
> systems, but sometimes it can be even caused by some tool's error or
> whatever. IMHO these are not good error messages. I'd prefer something
> like this:
>
> # Make sure we don't hit a problem with permissions, bug #289168
> if [[ ! -r ${base} ]] ; then
> eerror "Unable to read ${base}. Please run chmod 755 ${base}"
> eerror "and try again."
> die "unable to read ${base}"
> fithe issue is in basic assumptions. you're assuming that -r means a chmod will fix it because the error is due to missing +r bits. i make no assumptions and merely propose the most likely problem category (missing +r bits). a subtle, but important, distinction (at least in my mind). -mike
signature.asc
Description: This is a digitally signed message part.
