On 10/18/18 7:47 AM, Cowboy wrote: > On Thu, 18 Oct 2018 14:07:17 +1300 > Robert Jeffares <[email protected]> wrote: > >> On 10/10/18 2:54 AM, Rob Landry wrote: > >>> The scripts worked perfectly from the command line, but not when >>> called from Rivendell. > >>> However, what I've just discovered is that the Bruins scripts are >>> failing because they don't have permissions to access the serial port >>> -- even though user 'scott' is in the dialout group and does have such >>> permissions. > >>> The obvious question is: what user is it running as? Since the scripts >>> were working from the command line, 'scott' clearly had permissions to >>> access the serial port. >>> >>> I vaguely recall having encountered this problem before. > > I have a vague recollection as well, but it's vague, and I'm old. > > It occurs to me, that the easiest way to discover what's happening, > is to add into the script... ( so you know what the system thinks inside the > script ) > printenv > script.log > which will dump almost everything you'd want or need to know into that file > as far as who the script runs as, and what that user is, and is not.
Following up on Kurt's suggestion: here is a bit of BASH to up your game. Place the following two lines at or near the beginning of your script. This bit of BASH will cause ALL (both "normal", so-called STDOUT and "error", so-called STDERR) output to be sent to script.log. exec 1> /tmp/script.log exec 2>&1 I tend to put lines like these in all my RML-initiated shell scripts in order to keep track of what they have done and to facilitate troubleshooting. ~David
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Rivendell-dev mailing list [email protected] http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
