Re: custom rc.d script not working

2006-12-06 Thread Jerry McAllister
On Wed, Dec 06, 2006 at 08:56:37AM +0530, Gobbledegeek wrote:

> My script is in /etc/rc.d and it executes - only when I login and find
> no zebra process... executing it manually starts zebra allright.
> 
> Why should I put it in /usr/local/etc/rc.d ?

Because that is where the system expects to find scripts to 
start up at boot time.

jerry

> 
> I think I see a 0.99.5 version in freshports.org. I'll just use that 
> instead.
> 
> Thanks ye all for the help...
> 
> Rgrds
> 
> On 12/5/06, Jerry McAllister <[EMAIL PROTECTED]> wrote:
> >On Tue, Dec 05, 2006 at 11:30:41AM +, Tom Judge wrote:
> >
> >> Gobbledegeek wrote:
> >> >I  compiled quagga 0.99.5  from source (not  freebsd port) and  wrote  
> >this
> >> >little  script in the /etc/rc.d/zebra  file.
> >> >---
> >> >#!/bin/sh
> >> >
> >> ># PROVIDE: zebra
> >> ># REQUIRE: NETWORKING
> >> >
> >> >. /etc/rc.subr
> >> >
> >> >name="zebra"
> >> >rcvar=${name}_enable
> >> >required_files="/usr/local/etc/${name}.conf"
> >> >command="/usr/local/sbin/${name}"
> >> >command_args="-d"
> >> >pidfile="/var/run/${name}.pid"
> >> >load_rc_config $name
> >> >run_rc_command "$1"
> >> >--
> >> >
> >> >/etc/rc.conf has  zebra_enable="yes"
> >> >
> >> >However it only starts zebra  when  I execute  it manually from
> >> >command  line.  When I boot  freebsd, it  executes   and I see
> >> >message  in boot screen  that zebra  is starting, but on login I find
> >> >zebra isn't running.
> >> >all files in /usr/local/sbin/   for  zebra  executables are  owned  by
> >> >quagga/quagga user/group.
> >> >
> >> >Once I  get this working, I  will ofcourse  add scripts for ospfd  and
> >> >bgpd and isisd..  but it beats me why this isn't  working...
> >> >
> >> >This is  on  freebsd 6.2  RC1  i386.
> >> >
> >> >Thanks very much in advance  for  your help...
> >> >
> >> >PS:  Please  CC  me as I am not subscribed.
> >> >
> >
> >First, I presume you mean to say that you put the script
> >in the  '/usr/local/etc/rc.d/'  directory and not just /etc/rc.d
> >
> >Secondly, my most frequent error is error with these is to forget
> >to make them executable.  If the script does not have execute
> >permission, it is ignored.
> >
> >jerry
> >
> >>
> >> ___
> >> freebsd-questions@freebsd.org mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >> To unsubscribe, send any mail to 
> >"[EMAIL PROTECTED]"
> >
> 
> 
> -- 
> Rgrds
> GobbledeGeek
> [Everything but Gobbledegook.. !!]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: custom rc.d script not working

2006-12-05 Thread Lane
On Tuesday 05 December 2006 21:26, Gobbledegeek wrote:
> My script is in /etc/rc.d and it executes - only when I login and find
> no zebra process... executing it manually starts zebra allright.
>
> Why should I put it in /usr/local/etc/rc.d ?
>
> I think I see a 0.99.5 version in freshports.org. I'll just use that
> instead.
>
> Thanks ye all for the help...
>
> Rgrds
>
> On 12/5/06, Jerry McAllister <[EMAIL PROTECTED]> wrote:
> > On Tue, Dec 05, 2006 at 11:30:41AM +, Tom Judge wrote:
> > > Gobbledegeek wrote:
> > > >I  compiled quagga 0.99.5  from source (not  freebsd port) and  wrote 
> > > > this little  script in the /etc/rc.d/zebra  file.
> > > >---
> > > >#!/bin/sh
> > > >
> > > ># PROVIDE: zebra
> > > ># REQUIRE: NETWORKING
> > > >
> > > >. /etc/rc.subr
> > > >
> > > >name="zebra"
> > > >rcvar=${name}_enable
> > > >required_files="/usr/local/etc/${name}.conf"
> > > >command="/usr/local/sbin/${name}"
> > > >command_args="-d"
> > > >pidfile="/var/run/${name}.pid"
> > > >load_rc_config $name
> > > >run_rc_command "$1"
> > > >--
> > > >
> > > >/etc/rc.conf has  zebra_enable="yes"
> > > >
> > > >However it only starts zebra  when  I execute  it manually from
> > > >command  line.  When I boot  freebsd, it  executes   and I see
> > > >message  in boot screen  that zebra  is starting, but on login I find
> > > >zebra isn't running.
> > > >all files in /usr/local/sbin/   for  zebra  executables are  owned  by
> > > >quagga/quagga user/group.
> > > >
> > > >Once I  get this working, I  will ofcourse  add scripts for ospfd  and
> > > >bgpd and isisd..  but it beats me why this isn't  working...
> > > >
> > > >This is  on  freebsd 6.2  RC1  i386.
> > > >
> > > >Thanks very much in advance  for  your help...
> > > >
> > > >PS:  Please  CC  me as I am not subscribed.
> >
> > First, I presume you mean to say that you put the script
> > in the  '/usr/local/etc/rc.d/'  directory and not just /etc/rc.d
> >
> > Secondly, my most frequent error is error with these is to forget
> > to make them executable.  If the script does not have execute
> > permission, it is ignored.
> >
> > jerry
> >
> > > ___
Sorry to butt in ... butt

You came from linux, no?

The reason to put it in /usr/local/etc/rc.d instead of /etc/rc.d is because 
everyting in /etc is managed by the OS.  Everything in /usr/local is managed 
by you.

This is not of particular concern if you intend to just "play" with the OS and 
never commit to it ... let alone upgrade it, or use it in a production 
environment.  If you don't intend to use it in a production environment then 
put anything you want into /etc.

But if you plan to use the OS the way it was intended, then you will 
understand how an upgrade, and mergemaster, will take days instead of hours, 
because you've monkeyed with stuff in /etc

Pretend it's Windows.  Now ask yourself, "do I really need to put this file 
into C:\Windows\System32?"  Clearly the answer is ... "WHAT ARE YOU DOING 
COMPARING THIS TO WINDOWS"

But, clearly, I digress :)

lane
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: custom rc.d script not working

2006-12-05 Thread Gobbledegeek

My script is in /etc/rc.d and it executes - only when I login and find
no zebra process... executing it manually starts zebra allright.

Why should I put it in /usr/local/etc/rc.d ?

I think I see a 0.99.5 version in freshports.org. I'll just use that instead.

Thanks ye all for the help...

Rgrds

On 12/5/06, Jerry McAllister <[EMAIL PROTECTED]> wrote:

On Tue, Dec 05, 2006 at 11:30:41AM +, Tom Judge wrote:

> Gobbledegeek wrote:
> >I  compiled quagga 0.99.5  from source (not  freebsd port) and  wrote  this
> >little  script in the /etc/rc.d/zebra  file.
> >---
> >#!/bin/sh
> >
> ># PROVIDE: zebra
> ># REQUIRE: NETWORKING
> >
> >. /etc/rc.subr
> >
> >name="zebra"
> >rcvar=${name}_enable
> >required_files="/usr/local/etc/${name}.conf"
> >command="/usr/local/sbin/${name}"
> >command_args="-d"
> >pidfile="/var/run/${name}.pid"
> >load_rc_config $name
> >run_rc_command "$1"
> >--
> >
> >/etc/rc.conf has  zebra_enable="yes"
> >
> >However it only starts zebra  when  I execute  it manually from
> >command  line.  When I boot  freebsd, it  executes   and I see
> >message  in boot screen  that zebra  is starting, but on login I find
> >zebra isn't running.
> >all files in /usr/local/sbin/   for  zebra  executables are  owned  by
> >quagga/quagga user/group.
> >
> >Once I  get this working, I  will ofcourse  add scripts for ospfd  and
> >bgpd and isisd..  but it beats me why this isn't  working...
> >
> >This is  on  freebsd 6.2  RC1  i386.
> >
> >Thanks very much in advance  for  your help...
> >
> >PS:  Please  CC  me as I am not subscribed.
> >

First, I presume you mean to say that you put the script
in the  '/usr/local/etc/rc.d/'  directory and not just /etc/rc.d

Secondly, my most frequent error is error with these is to forget
to make them executable.  If the script does not have execute
permission, it is ignored.

jerry

>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"




--
Rgrds
GobbledeGeek
[Everything but Gobbledegook.. !!]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: custom rc.d script not working

2006-12-05 Thread Jerry McAllister
On Tue, Dec 05, 2006 at 11:30:41AM +, Tom Judge wrote:

> Gobbledegeek wrote:
> >I  compiled quagga 0.99.5  from source (not  freebsd port) and  wrote  this
> >little  script in the /etc/rc.d/zebra  file.
> >---
> >#!/bin/sh
> >
> ># PROVIDE: zebra
> ># REQUIRE: NETWORKING
> >
> >. /etc/rc.subr
> >
> >name="zebra"
> >rcvar=${name}_enable
> >required_files="/usr/local/etc/${name}.conf"
> >command="/usr/local/sbin/${name}"
> >command_args="-d"
> >pidfile="/var/run/${name}.pid"
> >load_rc_config $name
> >run_rc_command "$1"
> >--
> >
> >/etc/rc.conf has  zebra_enable="yes"
> >
> >However it only starts zebra  when  I execute  it manually from
> >command  line.  When I boot  freebsd, it  executes   and I see
> >message  in boot screen  that zebra  is starting, but on login I find
> >zebra isn't running.
> >all files in /usr/local/sbin/   for  zebra  executables are  owned  by
> >quagga/quagga user/group.
> >
> >Once I  get this working, I  will ofcourse  add scripts for ospfd  and
> >bgpd and isisd..  but it beats me why this isn't  working...
> >
> >This is  on  freebsd 6.2  RC1  i386.
> >
> >Thanks very much in advance  for  your help...
> >
> >PS:  Please  CC  me as I am not subscribed.
> >

First, I presume you mean to say that you put the script
in the  '/usr/local/etc/rc.d/'  directory and not just /etc/rc.d

Secondly, my most frequent error is error with these is to forget
to make them executable.  If the script does not have execute
permission, it is ignored.

jerry

> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: custom rc.d script not working

2006-12-05 Thread Tom Judge

Gobbledegeek wrote:

I  compiled quagga 0.99.5  from source (not  freebsd port) and  wrote  this
little  script in the /etc/rc.d/zebra  file.
---
#!/bin/sh

# PROVIDE: zebra
# REQUIRE: NETWORKING

. /etc/rc.subr

name="zebra"
rcvar=${name}_enable
required_files="/usr/local/etc/${name}.conf"
command="/usr/local/sbin/${name}"
command_args="-d"
pidfile="/var/run/${name}.pid"
load_rc_config $name
run_rc_command "$1"
--

/etc/rc.conf has  zebra_enable="yes"

However it only starts zebra  when  I execute  it manually from
command  line.  When I boot  freebsd, it  executes   and I see
message  in boot screen  that zebra  is starting, but on login I find
zebra isn't running.
all files in /usr/local/sbin/   for  zebra  executables are  owned  by
quagga/quagga user/group.

Once I  get this working, I  will ofcourse  add scripts for ospfd  and
bgpd and isisd..  but it beats me why this isn't  working...

This is  on  freebsd 6.2  RC1  i386.

Thanks very much in advance  for  your help...

PS:  Please  CC  me as I am not subscribed.




In the latest quagga port there is already an RC script ready for use. 
It gets installed to /usr/local/etc/rc.d/.


Tom J
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"