Charles Steinkuehler wrote:
> 
> > We've *not* been able to get mailonerr/moe.config to work (from Charles'
> > website: <http://lrp.steinkuehler.net/Packages/Utilities.htm>).
> >
> > root@bluetrout:/var/log
> > # /usr/local/bin/mailonerr
> > /usr/local/bin/mailonerr: 56: Syntax error: end of file unexpected
> > (expecting "}")
> >
> > root@bluetrout:/var/log
> > # /usr/local/bin/mailonerr moe.config
> > /usr/local/bin/mailonerr: 56: Syntax error: end of file unexpected
> > (expecting "}")
> >
> > It fails at this line:
> >
> > { su $su_usr -c "$cmd" } 2>$prefix.err 1>$prefix.out
> >
> > The command:
> >
> > su $su_usr -c "$cmd"
> >
> > works from the CLI; but, *fails* when called from this script.  Yes, of
> > course, we have accounted for variable expansion . . .
> >
> > What do you think?
> 
> Hmm...barring a problem with the script itself (like DOS end-of-lines or
> something when it got downloaded), I don't know what's wrong.  Verify the
> script didn't get mangled, and if it looks OK, provide details on the system
> you're running.  I did have to make some mods to moe when I migrated it to a
> 'full' linux system (a RH 7.0 system running bash).  I don't think this was
> one of the problems I encountered, but it could have been...

First, let me say that we're still struggling with mail server issues;
so, success on this issue probably does *not* require mail received ;<

Yes, we cleanse all scripts of the dreaded ^M, including this one.  If
there is some other mangling issue, we remain unaware . . .

I'm puzzled by the use of curly braces '{  }' in that line.  *Without*
the braces, we can call mailonerr from CLI _without_ error.

Once this issue is resolved, the next question is, How does LRP call
mailonerr?  Ought we to put it in some crontab file?

What do you think?

-- 

Best Regards,

mds
mds resource
888.250.3987

"Dare to fix things before they break . . . "

"Our capacity for understanding is inversely proportional to how much we
think we know.  The more I know, the more I know I don't know . . . "

_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to