Re: [RDD] Running shell commands via RML

2017-04-27 Thread Robert Jeffares



On 27/04/17 00:47, Cowboy wrote:

  Let's take something that works and has worked for decades perfectly fine,
  ( init ) and whole-sale replace it, because we can !

Like!


--
*Communication Consultants*
64 Warner Park Avenue

Laingholm

Auckland 0604

09 8176358

0221693124

06 650 6087
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-26 Thread Cowboy
On Wednesday 26 April 2017 01:34:19 pm Rob Landry wrote:
> > I saw no advantage to upstart. I see no advantage to systemd.
> > I see MANY advantages to init !
> 
> As do I. Is there any Linux distribution that still uses it?
> 

 Sorry, I missed that.
 Slackware still does, for now anyway.
 ( well, the BSD style of various rc.XXX start-up and shutdown scripts )
 init is still PID 1 on Slackware 14.0
 Others ?
 yolinux, gentoo I think. Probably others.
 systemd and upstart were attempts to "fix" SystemV init.
 ( not that there was much wrong with it )

-- 
Cowboy

http://cowboy.cwf1.com

"... And remember: if you don't like the news, go out and make some of
your own."
-- "Scoop" Nisker, KFOG radio reporter
   Preposterous Words
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-26 Thread Cowboy
On Wednesday 26 April 2017 01:34:19 pm you wrote:

> Where do builders of communications satellites and space probes get their 
> caps? Some of those probes have been functioning for decades, all the 
> while bombarded by intense radiation.

 Good point !
 5 years due to the bad electrolyte the rest of us are subject to
 would, indeed, be unacceptable in locations where field service
 is... shall we say... expensive ?

> > I did update the house server to Slackware 14 64 bit, but only because it
> > was going down for replacement anyway.
> 
> I've never tried Slackware. Looking at the Web site, I see references to 
> XFree86; are they still using that?

 Xorg, derived from Xfree86 v4.4rc2 itself derived from X386 v1.2 contributed
 to X11R5 back when. 

> I can't see that they have any package manager like yum or apt. I imagine 
> that means I'd have to install everything from source, no?

 There are after market add-ons available, like slapt. You'd probably find that
 familiar. Yum, no. I haven't found, but haven't looked too hard, either.
 Slackware does have it's own native package manager, but it does NO dependency
 checking whatever. Slackware packages are available from various places, and
 slack pack makes them relatively easy to build from source, so no, you wouldn't
 have to do it all from source.
 Slackware is NOT for the appliance operator !
 But, the lack of dependency checking does make it possible to do things that
 the appliance oriented systems simply won't.
 OTOH, it sometimes makes doing some of these things necessary.
 If you want to know what's going on "under the hood" you will, partly because
 you'll have to !

 Fred got me onto Slackware back in the 7.0 days. I came from Debian.
 Back then, Ian was still involved, so Debian was OK.
 When FSF dropped HURD and Ian left, leaving Debian to FSF, it was
 time for me to move on anyway.
 Slackware has grown, but really not changed much. It's still a legit UNIX.
 I've also been through SCO Unix, QNX, VX, Blue Cat, LynxOS, SLAX, and a couple
 others as well, including Knoppix ( a Debian derivative ) so do take it all
 for what it's worth.

-- 
Cowboy

http://cowboy.cwf1.com

"... And remember: if you don't like the news, go out and make some of
your own."
-- "Scoop" Nisker, KFOG radio reporter
   Preposterous Words
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-26 Thread Rob Landry

On Wed, 26 Apr 2017, Cowboy wrote:


I saw no advantage to upstart. I see no advantage to systemd.
I see MANY advantages to init !


As do I. Is there any Linux distribution that still uses it?


I'm told that systemd allows the system to start a few seconds faster.
On machines other than my laptop which gets restarted every two weeks
or so, on machines that get booted once in 5 years, a few seconds of
saved boot time is an advantage because ... ???


It isn't.


Since caps are now made in China, 5 years is asking a lot on a motherboard.
The chinese still make cheap junk. Unfortunately, people only want to pay
for cheap junk, so I don't even know where one can buy quality caps,
at any price let alone competitive.


Where do builders of communications satellites and space probes get their 
caps? Some of those probes have been functioning for decades, all the 
while bombarded by intense radiation.



I did update the house server to Slackware 14 64 bit, but only because it
was going down for replacement anyway.


I've never tried Slackware. Looking at the Web site, I see references to 
XFree86; are they still using that?


I can't see that they have any package manager like yum or apt. I imagine 
that means I'd have to install everything from source, no?



Rob

--
Я там, где ребята толковые,
Я там, где плакаты "Вперёд",
Где песни рабочие новые
Страна трудовая поёт.


___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-26 Thread Cowboy
On Wednesday 26 April 2017 10:57:23 am Sherrod Munday wrote:
> Without speaking for Rob, and not knowing his specific situation, my guess is 
> that it's called preventative maintenance: replace the system hardware before 
> it fails.  Those spinning disks don't last forever, after all, and neither do 
> power supplies.

 My reference was entirely to replacing init with systemd, and upstart, and the
 variety of other software replacements for no good reason other than we can.

 I saw no advantage to upstart. I see no advantage to systemd.
 I see MANY advantages to init !

 I'm told that systemd allows the system to start a few seconds faster.
 On machines other than my laptop which gets restarted every two weeks
 or so, on machines that get booted once in 5 years, a few seconds of
 saved boot time is an advantage because ... ???

 As to hardware, we agree.

 My Spam-O-Matic prototype has been running for 14 years, as designed,
 self-training and maintenance free with exception of a minute or three
 around 6 years ago to replace the hard disks.
 ( the design goal 80% with zero false-positive was exceeded in the first
 minute, and it's historically still better than 99.87% with a half-dozen
 or so false positives in that whole 14 years )
 (( unintended, it also catches 75% or better of malware ))
 That's a l-o-n-g time, but it does pre-date the chinese capacitor issue.
 Since caps are now made in China, 5 years is asking a lot on a motherboard.
 The chinese still make cheap junk. Unfortunately, people only want to pay
 for cheap junk, so I don't even know where one can buy quality caps,
 at any price let alone competitive.

 So, Spam-O was replaced this past weekend with one of those Image Stream
 boxes we talked about, with 40GB RAID-1 disks, so it'll need attention in
 5 or 6 years as well.
 The other Image Stream replaced my Dell Poweredge server a couple
 months ago, also with a 2G RAM upgrade and in this one, 2T RAID-1.

 Next, I'll strap a boat battery across the 12V supply, and I expect both
 Spam-O and the house server will run maintenance free for 5 years or better.
 The up-side is that I won't have to power down to replace the battery anymore !
 Come to think of it, SATA is hot-swapable, so neither of them may *need*
 powered down for anything within the balance of my lifetime !
 I did update the house server to Slackware 14 64 bit, but only because it
 was going down for replacement anyway.
 Spam-O however, I ultimately left at Slackware 9.1 and I see no reason
 whatever to update it, and a couple of very good reasons not to.
 ( though I did update the kernel to a 2.6.27 but only to handle the sata 
interface ) 

 Were I in Rob's position, I suspect I'd be doing exactly what he is, for the
 same reasons, and griping about systemd as well.

-- 
Cowboy

http://cowboy.cwf1.com

"... And remember: if you don't like the news, go out and make some of
your own."
-- "Scoop" Nisker, KFOG radio reporter
   Preposterous Words
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-26 Thread Sherrod Munday
On Apr 26, 2017, at 8:47, Cowboy  wrote:
> Hey, I know !
> Let's take something that works and has worked for decades perfectly fine,
> ( init ) and whole-sale replace it, because we can !

Without speaking for Rob, and not knowing his specific situation, my guess is 
that it's called preventative maintenance: replace the system hardware before 
it fails.  Those spinning disks don't last forever, after all, and neither do 
power supplies.

This issue is one where probability and statistics mean that the farther out 
you go on the distribution curve (i.e. the longer in time you wait), the higher 
the cumulative probability that you'll suffer a system failure.

The challenge for the broadcast engineer is knowing when to replace a 
seemingly-perfectly-functioning system with another brand-new one that has no 
known history (other than the initial burn-in).  And, of course as they tell 
you in financial markets, past performance is no guarantee of future 
performance -- so that new system could fail in a day, or the old system could 
last beyond your time at the station (or on this earth, but that's another 
story).  

But generally, it's a risky thing to keep 10-year-old computers running 24x7 - 
primarily if they were built with consumer-grade hardware.

Yes, we have 10-y-o servers running at my workplace, and I've only had one 
drive fail out of 48 SATA disks in a couple of NAS units around that vintage, 
but stats are stats ... 


The real question here is whether we would rather deal with hard downtime after 
a unit fails, or proactively swap it out prior to full systemic failure.  

The other option, of course, is to put the new system in place in parallel with 
the old and have a hot standby system.  That's the way we ran our Rivendell 
system for ~8 years ... but doing that does mean that maintenance doubles, and 
workload (i.e. normal operations usage of loading up new content, schedules, 
etc.) also doubles.

To each his own style and design... as to whatever makes the most sense in 
their environment.
—
Sherrod Munday


___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-26 Thread Cowboy
On Wednesday 26 April 2017 08:32:55 am Rob Landry wrote:
> That may be. systemd makes me jump through a lot of hoops I didn't used to 
> have.

 Hey, I know !
 Let's take something that works and has worked for decades perfectly fine,
 ( init ) and whole-sale replace it, because we can !

-- 
Cowboy

http://cowboy.cwf1.com

"... And remember: if you don't like the news, go out and make some of
your own."
-- "Scoop" Nisker, KFOG radio reporter
   Preposterous Words
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-26 Thread Rob Landry

On Tue, 25 Apr 2017, David Klann wrote:


This is a long shot, but is SELinux or AppArmor enabled on that box.
Neither of these security tools is enabled by default on Debian 8, but...


No, those are not enabled.


Also, since Debian 8 is now initialized with systemd(8), this is also a
possible detail that the devil has taken control of...


That may be. systemd makes me jump through a lot of hoops I didn't used to 
have.


This particular machine is going to run "headless"; it's being shipped to 
a network affiliate, where it will function much like a satellite receiver 
in that music and network voice tracks will play from the box, which will 
fire relays from time to time to call for local breaks, ID's, and bumpers.


It replaces another Rivendell box I built in 2007 which has been running 
there for the past ten years.


Under Debian 8, the Rivendell daemons are started by a cron job runnig as 
"root" that first waits 30 seconds for everything else to start.


Then another cron job running as 'scott' starts a VNC server, which 
creates a virtual desktop via .vnc/xstartup, one line of which launches a 
Perl script called rdairplay.pl that starts rdairplay on the virtual 
desktop and loads and starts the log for the current day. Timed events 
within that log are then used to get it to run more or less on time.



It's quite weird that 'scott' can write /dev/ttyUSB0, but 'scott' can't. :)


Yup. It reminds me of the ten Zathras brothers ("well, nine, now") on the 
TV show "Babylon 5", who all have the same name, but with subtle 
differences in pronunciation ("Oh!!! You did not meet ZATH-ras... you met 
ZATH-ras!").



Rob

--
Я там, где ребята толковые,
Я там, где плакаты "Вперёд",
Где песни рабочие новые
Страна трудовая поёт.___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-25 Thread Kit Raymond Haskins

sudo usermod -a -G dialout $USER

I had to do this with serial access issues with programs like minicom ...

Might it work here ???

---
Thru the Ethernet, past the Gateway, off the modem pool, nothing but NET .
k...@ka0wuc.org

When I was 10, I caught the radio bug, it appears to be over ...
Hey Rob,

This is a long shot, but is SELinux or AppArmor enabled on that box.
Neither of these security tools is enabled by default on Debian 8, but...

Also, since Debian 8 is now initialized with systemd(8), this is also a
possible detail that the devil has taken control of...

It's quite weird that 'scott' can write /dev/ttyUSB0, but 'scott' can't. :)

  ~David


On 4/25/17 7:38 AM, Rob Landry wrote:
> On Mon, 24 Apr 2017, Sherrod Munday wrote:
> 
>> One idea is that you could add a script line that simply executes a
>> 'who am i' (or 'whoami' depending on your OS) command and redirect the
>> output to a world-writeable directory (or pre-created and 'chmod 777'd
>> file).
> 
> I did that, and it's running as 'scott'. Weird; the script run from the
> command line (also as 'scott') fires the relays, but not from Rivendell
> unless the permissions for /dev/ttyUSB0 are set to 777.
> 
> I have decided to throw in the towel and set up a udev rule so the
> KMTronic box always comes up with 777 permissions. Now the relays fire,
> and everybody will be happy.
> 
> This must be some sort of quick in Debian 8; the last time I used a
> KMTronic box it was under Debian 7.
> 
> 
> Rob
> 
> 
> 
> ___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
> 



signature.asc
Description: OpenPGP digital signature
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-25 Thread David Klann
Hey Rob,

This is a long shot, but is SELinux or AppArmor enabled on that box.
Neither of these security tools is enabled by default on Debian 8, but...

Also, since Debian 8 is now initialized with systemd(8), this is also a
possible detail that the devil has taken control of...

It's quite weird that 'scott' can write /dev/ttyUSB0, but 'scott' can't. :)

  ~David


On 4/25/17 7:38 AM, Rob Landry wrote:
> On Mon, 24 Apr 2017, Sherrod Munday wrote:
> 
>> One idea is that you could add a script line that simply executes a
>> 'who am i' (or 'whoami' depending on your OS) command and redirect the
>> output to a world-writeable directory (or pre-created and 'chmod 777'd
>> file).
> 
> I did that, and it's running as 'scott'. Weird; the script run from the
> command line (also as 'scott') fires the relays, but not from Rivendell
> unless the permissions for /dev/ttyUSB0 are set to 777.
> 
> I have decided to throw in the towel and set up a udev rule so the
> KMTronic box always comes up with 777 permissions. Now the relays fire,
> and everybody will be happy.
> 
> This must be some sort of quick in Debian 8; the last time I used a
> KMTronic box it was under Debian 7.
> 
> 
> Rob
> 
> 
> 
> ___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
> 



signature.asc
Description: OpenPGP digital signature
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-25 Thread Rob Landry

On Mon, 24 Apr 2017, Sherrod Munday wrote:

One idea is that you could add a script line that simply executes a 'who 
am i' (or 'whoami' depending on your OS) command and redirect the output 
to a world-writeable directory (or pre-created and 'chmod 777'd file).


I did that, and it's running as 'scott'. Weird; the script run from the 
command line (also as 'scott') fires the relays, but not from Rivendell 
unless the permissions for /dev/ttyUSB0 are set to 777.


I have decided to throw in the towel and set up a udev rule so the 
KMTronic box always comes up with 777 permissions. Now the relays fire, 
and everybody will be happy.


This must be some sort of quick in Debian 8; the last time I used a 
KMTronic box it was under Debian 7.



Rob

--
Я там, где ребята толковые,
Я там, где плакаты "Вперёд",
Где песни рабочие новые
Страна трудовая поёт.
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-24 Thread Wayne Merricks
I may be wrong but it could be using whatever user the daemons are running
as but then that doesn't make sense as normally that is root unless you
have changed things.

Unless you haven't logged out/in since adding your user to the dialout
group?

The only other thing I can think of is Debian 8 doing something odd?

On 24 Apr 2017 04:30, "Rob Landry" <41001...@interpring.com> wrote:


If I create a macro with a line such as:

RN /home/scott/relay.sh 5!

... as which user will that command run?

I have just built a new Rivendell machine that uses such a shell command to
fire a relay on a USB relay box that appears as /dev/ttyUSB0.

The comand works flawlessly... if I run it manually from a command line.
Rivendell, however, executes the shell script, but the script won't talk to
the box unless I chmod o+w /dev/ttyUSB0 . I don't want to do that; I'd
rather add the user in question to the dialout group, if I can figure out
what user it is.

Rivendell is running as the user 'scott'. 'scott' is already a member of
the dialout group; therefore, the command must be executing as some other
user, but which one?

This is RD version 2.15.3 running on Debian 8.

The box is a KMTronic Ltd. Model U8CR. I've used them before on Rivendell
systems and have not had this problem. In the past, adding 'scott' to the
dialout group always got the box working. I wonder what's changed.


Rob

-- 
Я там, где ребята толковые,
Я там, где плакаты "Вперёд",
Где песни рабочие новые
Страна трудовая поёт.
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Running shell commands via RML

2017-04-23 Thread Sherrod Munday

On Apr 23, 2017, at 23:30, Rob Landry <41001...@interpring.com> wrote:

> 
> If I create a macro with a line such as:
> 
>   RN /home/scott/relay.sh 5!
> 
> ... as which user will that command run?

I'll defer the specific answer to those who know offhand.
 
One idea is that you could add a script line that simply executes a 'who am i' 
(or 'whoami' depending on your OS) command and redirect the output to a 
world-writeable directory (or pre-created and 'chmod 777'd file).

The first command in your script would therefore be something like:
whoami > /tmp/user.txt

and you could go 'cat' that file thereafter.

Of course, you could also just look at the file permissions to see the owner 
and/or UID.

Yeah, it's a Rube Goldberg-ish way of finding out, but it should work in case 
nobody else answers quickly.

—
Sherrod Munday


___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


[RDD] Running shell commands via RML

2017-04-23 Thread Rob Landry


If I create a macro with a line such as:

RN /home/scott/relay.sh 5!

... as which user will that command run?

I have just built a new Rivendell machine that uses such a shell command 
to fire a relay on a USB relay box that appears as /dev/ttyUSB0.


The comand works flawlessly... if I run it manually from a command line. 
Rivendell, however, executes the shell script, but the script won't talk 
to the box unless I chmod o+w /dev/ttyUSB0 . I don't want to do that; I'd 
rather add the user in question to the dialout group, if I can figure out 
what user it is.


Rivendell is running as the user 'scott'. 'scott' is already a member of 
the dialout group; therefore, the command must be executing as some other 
user, but which one?


This is RD version 2.15.3 running on Debian 8.

The box is a KMTronic Ltd. Model U8CR. I've used them before on Rivendell 
systems and have not had this problem. In the past, adding 'scott' to the 
dialout group always got the box working. I wonder what's changed.



Rob

--
Я там, где ребята толковые,
Я там, где плакаты "Вперёд",
Где песни рабочие новые
Страна трудовая поёт.___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev