9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] rc shell script run by cron on linux
@ 2014-11-08 12:44 Rudolf Sykora
  2014-11-08 13:27 ` Charles Forsyth
  0 siblings, 1 reply; 3+ messages in thread
From: Rudolf Sykora @ 2014-11-08 12:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

I tried to run a cron job on linux using an rc script
and bumped into a problem.
When the job tries to be run I get something like

/usr/local/plan9/rcmain: rc (/home/sykora/plan9port/bin/
rc): .: can't open: No such file or directory

(I don't know why it starts with /usr/local...; but it is
probably not really relevant here.)

In my crontab I have specified a PATH containing
/home/sykora/plan9port/bin
(where rc itself is located)
but that seems to no be enough...
(If I hadn't I wouldn't have got to rcmain ever; so rc
calls for some reason rcmain [why? must it?])

Have anybody ever solved a problem like this?
(What is the minimum I have to have in order to
run rc script on linux?)

Thanks
Ruda



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] rc shell script run by cron on linux
  2014-11-08 12:44 [9fans] rc shell script run by cron on linux Rudolf Sykora
@ 2014-11-08 13:27 ` Charles Forsyth
  2014-11-08 16:08   ` Rudolf Sykora
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Forsyth @ 2014-11-08 13:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

On 8 November 2014 12:44, Rudolf Sykora <rudolf.sykora@gmail.com> wrote:

> Have anybody ever solved a problem like this?
> (What is the minimum I have to have in order to
> run rc script on linux?)
>

Just a guess but rc needs the bootstrap rcmain file, which it is looking
for in the default
directory, which is in /usr/local. I think if you set/export
PLAN9=/home/sykora/plan9port
as well as PATH, it might work.

[-- Attachment #2: Type: text/html, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] rc shell script run by cron on linux
  2014-11-08 13:27 ` Charles Forsyth
@ 2014-11-08 16:08   ` Rudolf Sykora
  0 siblings, 0 replies; 3+ messages in thread
From: Rudolf Sykora @ 2014-11-08 16:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 8 November 2014 14:27, Charles Forsyth <charles.forsyth@gmail.com> wrote:
>
> On 8 November 2014 12:44, Rudolf Sykora <rudolf.sykora@gmail.com> wrote:
>>
>> Have anybody ever solved a problem like this?
>> (What is the minimum I have to have in order to
>> run rc script on linux?)
>
>
> Just a guess but rc needs the bootstrap rcmain file, which it is looking for
> in the default
> directory, which is in /usr/local. I think if you set/export
> PLAN9=/home/sykora/plan9port
> as well as PATH, it might work.

Thanks, exporting PLAN9 at a suitable place seems to have helped.

Still, only if you can tell (I will test it at some point anyhow), is
1) rc binary
2) rcmain
3) suitable setting of PLAN9 variable
enough if you want to pass your rc script to somebody
who does not have p9p installed?
(Say, I wrote some rc scripts and now other people want
to use it...)

Thanks
Ruda



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-08 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-08 12:44 [9fans] rc shell script run by cron on linux Rudolf Sykora
2014-11-08 13:27 ` Charles Forsyth
2014-11-08 16:08   ` Rudolf Sykora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).