Re: startup scripts not working

2007-05-14 Thread Apatewna

O/H Howard Goldstein έγραψε:


None of the scripts work, they show the same behavior,
and i ran them as root.


I don't have any of those installed but most of the local rc.d scripts 
need an enable flag in /etc/rc.conf . Take a look at your rc.d scripts 
and see if they need them to.  You can also run these with -x to see 
what's happening (eg.,  sh -x /usr/local/etc/rc.d/apache22 start)




Since the original question has been answered I'll just add a little 
more detail.


Whenever you install some software that has a run script in 
/usr/local/etc/rc.d, there is an easy way to figure out which parameters 
need to be enabled in /etc/rc.conf. Just run the script with the "rcvar" 
parameter. (eg /usr/local/etc/rc.d/apache22 rcvar)


The same applies for system services (sshd, inetd) that have their start 
scripts in /etc/rc.d


--
RTFM and STFW before anything bad happens
_
Thanos Rizoulis
Electronic Computing Systems Engineer
Larissa, Greece
FreeBSD/PCBSD user
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: startup scripts not working

2007-05-13 Thread Manolis Kiagias
Ghirai wrote:
> Hello list,
>
> Suddenly, the startup scripts for various applications won't work.
> I have these in /usr/local/etc/rc.d:
> apache22, ircservices, postgresql, pure-ftpd, unrealircd
>
> When i run any of them without parameters, they give out the parameters.
> But when i use any of the params, nothing happens.
>
> Starting the binaries themselves (from /usr/local/sbin, etc,
> depending on the application) works, and the applications
> themselves work fine.
>
> None of the scripts work, they show the same behavior,
> and i ran them as root.
>
> I'm running 6.2-RELEASE-p4.
>
> Any hints/help is appreciated.
>
> Thanks.
>   
I suggest you investigate what happens in your /etc/rc.conf script.
For example is there an apache22_enable="YES" line in there?
If not, running the /usr/local/etc/rc.d/apache22 start command will have
no effect.
Is it possible that somehow your /etc/rc.conf script is somehow damaged
/ renamed ?

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


Re: startup scripts not working

2007-05-10 Thread Ghirai
Hello Howard,

Friday, May 11, 2007, 1:09:01 AM, you wrote:

> Ghirai wrote:
>> Hello list,
>> 
>> Suddenly, the startup scripts for various applications won't work.
>> I have these in /usr/local/etc/rc.d:
>> apache22, ircservices, postgresql, pure-ftpd, unrealircd
>> 
>> When i run any of them without parameters, they give out the parameters.
>> But when i use any of the params, nothing happens.
>> 
>> Starting the binaries themselves (from /usr/local/sbin, etc,
>> depending on the application) works, and the applications
>> themselves work fine.
>> 
>> None of the scripts work, they show the same behavior,
>> and i ran them as root.

> I don't have any of those installed but most of the local rc.d scripts
> need an enable flag in /etc/rc.conf . Take a look at your rc.d scripts
> and see if they need them to.  You can also run these with -x to see 
> what's happening (eg.,  sh -x /usr/local/etc/rc.d/apache22 start)

You were right, i forgot to add the flag in rc.conf.

Thanks for the quick replies everyone.

-- 
Best regards,
Ghirai.

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


Re: startup scripts not working

2007-05-10 Thread Howard Goldstein

Ghirai wrote:

Hello list,

Suddenly, the startup scripts for various applications won't work.
I have these in /usr/local/etc/rc.d:
apache22, ircservices, postgresql, pure-ftpd, unrealircd

When i run any of them without parameters, they give out the parameters.
But when i use any of the params, nothing happens.

Starting the binaries themselves (from /usr/local/sbin, etc,
depending on the application) works, and the applications
themselves work fine.

None of the scripts work, they show the same behavior,
and i ran them as root.


I don't have any of those installed but most of the local rc.d scripts 
need an enable flag in /etc/rc.conf . Take a look at your rc.d scripts 
and see if they need them to.  You can also run these with -x to see 
what's happening (eg.,  sh -x /usr/local/etc/rc.d/apache22 start)


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


Re: Startup scripts question

2005-04-19 Thread Paul Schmehl
--On Monday, April 18, 2005 08:05:37 PM -0700 Joshua Lewis 
<[EMAIL PROTECTED]> wrote:

How do startup scripts work?
I added:
mysql_enable=²YES²
But I don¹t think it is working. I had rebooted my system the other day
and my mail server stopped working (postfix reading from mysql tables)
and I tried looking at my running processes:
ps ­ax |grep sql
Did you look in /var/log/messages for any errors?  Did you look in 
dmesg.boot?

and nothing was returned. So I guessed mysql was not running.
I tried:
mysql start
That won't work.  Look at the startup script and you'll see why.
and I got a socket error. I usually get this error when SQL was not
started properly. So I ran
/usr/local/etc/rc.d/mysql-server.sh start
And low and behold it was all working.
Sounds like something is preventing it from starting properly during the 
boot process.

So how do startup scripts work.
Did I add the wrong value to my /etc/rc.conf file?
Or did I miss something somewhere?
Does the entry in /etc/rc.conf correlate to the startup script. Should I
change my rc.conf file to read
mysql-server_enable=²YES²
No.  mysql_enable="YES" is the correct value.
Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
The University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Startup Scripts

2004-09-02 Thread Bill Moran
Scott Gerhardt <[EMAIL PROTECTED]> wrote:
> I am noticing that startup scripts in /usr/local/etc/rc.d are now being 
> initiated from /etc/rc.conf with the enable="YES" invocation. See 
> example from /usr/loccal/etc/rc.d/clamav-clamd.sh below, which I just 
> installed from ports.
> 
> Besides using the kill/killall methods, what is the preferred STOP | 
> RESTART etc methods now?  What is the purpose of "KEYWORD: FreeBSD 
> shutdown"

Documentation is still spotty, as this is a new feature, but this does
exist:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcng.html

> 
> #!/bin/sh
> #
> # $FreeBSD: ports/security/clamav/files/clamav-clamd.sh,v 1.3 
> 2004/04/19 15:21:33 eik Exp $
> #
> 
> # PROVIDE: clamd
> # REQUIRE: LOGIN
> # BEFORE: mail
> # KEYWORD: FreeBSD shutdown
> 
> #
> # Add the following lines to /etc/rc.conf to enable clamd:
> #
> #clamav_clamd_enable="YES"
> #
> # See clamd(8) for flags
> #
> 
> 
> Thanks,
> 
> --
> Scott A. Gerhardt, P.Geo.
> Gerhardt Information Technologies
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"


-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: startup scripts in /usr/local/etc/rc.d

2003-12-13 Thread Warren Block
On Fri, 12 Dec 2003, Andre Grove wrote:

> sorry. i have too much faith in ESP i guess. this is the script that is
> supposed to run:
>
> #!/usr/local/bin/bash

Use /bin/sh unless your script specifically requires features from
another shell.  This is better for portability and avoiding bad habits
like writing shell scripts that require bash. 8-)

> /usr/sbin/pppd /dev/caau1 modem crtscts 115200 lock asyncmap 0
> defaultroute debug passive persist

Try /dev/cuaa1 instead.

-Warren Block * Rapid City, South Dakota USA
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: startup scripts in /usr/local/etc/rc.d

2003-12-12 Thread Barry Byrne
Andre:

What is the script called?

It should end in .sh and be executable by root.

 - Barry

--
Barry Byrne, IT Manager,
WBT Systems, Block 2, Harcourt Centre
Harcourt Street, Dublin 2, Ireland


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Andre Grove
> Sent: 12 December 2003 13:38
> To: [EMAIL PROTECTED]
> Subject: Re: startup scripts in /usr/local/etc/rc.d
>
>
> sorry. i have too much faith in ESP i guess. this is the script that is
> supposed to run:
>
> #!/usr/local/bin/bash
> /usr/sbin/pppd /dev/caau1 modem crtscts 115200 lock asyncmap 0
> defaultroute debug passive persist
>
> It's supposed to bring up the PPP interface, but it doesn't. but running
> the script manually (not the command itself) does.
> There is no references in /var/spooll/messages that the script was even
> attempted at bootup.
>
> A
>
>
> Lowell Gilbert wrote:
>
> >*This message was transferred with a trial version of
> CommuniGate(tm) Pro*
> >Andre Grove <[EMAIL PROTECTED]> writes:
> >
> >
> >
> >>Why would a script not run? I have a script in /usr/local/etc/rc.d, I
> >>did chmod +x it, but it still does not run at startup.
> >>
> >>
> >
> >You didn't give much information there.  Not feeling terribly psychic
> >today, I'll just tell you what the manual says.
> >
> > o   Scripts are only executed if their basename(1) matches the shell
> > globbing pattern *.sh, and they are executable.  Any
> other files or
> > directories present within the directory are silently ignored.
> > o   When a script is executed at boot time, it is passed the string
> > ``start'' as its first and only argument.  At shutdown
> time, it is
> > passed the string ``stop'' as its first and only
> argument.  All rc.d
> > scripts are expected to handle these arguments
> appropriately.  If no
> > action needs to be taken at a given time (either boot
> time or shut-
> > down time) the script should exit successfully and
> without producing
> > an error message.
> >___
> >[EMAIL PROTECTED] mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"
> >
> >
> >
>
>
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"

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


Re: startup scripts in /usr/local/etc/rc.d

2003-12-12 Thread Andre Grove
sorry. i have too much faith in ESP i guess. this is the script that is 
supposed to run:

#!/usr/local/bin/bash
/usr/sbin/pppd /dev/caau1 modem crtscts 115200 lock asyncmap 0 
defaultroute debug passive persist

It's supposed to bring up the PPP interface, but it doesn't. but running 
the script manually (not the command itself) does.
There is no references in /var/spooll/messages that the script was even 
attempted at bootup.

A

Lowell Gilbert wrote:

*This message was transferred with a trial version of CommuniGate(tm) Pro*
Andre Grove <[EMAIL PROTECTED]> writes:
 

Why would a script not run? I have a script in /usr/local/etc/rc.d, I
did chmod +x it, but it still does not run at startup.
   

You didn't give much information there.  Not feeling terribly psychic
today, I'll just tell you what the manual says.
o   Scripts are only executed if their basename(1) matches the shell
globbing pattern *.sh, and they are executable.  Any other files or
directories present within the directory are silently ignored.
o   When a script is executed at boot time, it is passed the string
``start'' as its first and only argument.  At shutdown time, it is
passed the string ``stop'' as its first and only argument.  All rc.d
scripts are expected to handle these arguments appropriately.  If no
action needs to be taken at a given time (either boot time or shut-
down time) the script should exit successfully and without producing
an error message.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
 



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


Re: startup scripts in /usr/local/etc/rc.d

2003-12-12 Thread Lowell Gilbert
Andre Grove <[EMAIL PROTECTED]> writes:

> Why would a script not run? I have a script in /usr/local/etc/rc.d, I
> did chmod +x it, but it still does not run at startup.

You didn't give much information there.  Not feeling terribly psychic
today, I'll just tell you what the manual says.

 o   Scripts are only executed if their basename(1) matches the shell
 globbing pattern *.sh, and they are executable.  Any other files or
 directories present within the directory are silently ignored.
 o   When a script is executed at boot time, it is passed the string
 ``start'' as its first and only argument.  At shutdown time, it is
 passed the string ``stop'' as its first and only argument.  All rc.d
 scripts are expected to handle these arguments appropriately.  If no
 action needs to be taken at a given time (either boot time or shut-
 down time) the script should exit successfully and without producing
 an error message.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: startup scripts in /usr/local/etc/rc.d

2003-12-12 Thread Andre Grove
Why would a script not run? I have a script in /usr/local/etc/rc.d, I 
did chmod +x it, but it still does not run at startup.
Maybe I should re-install! :P

Andre

Lowell Gilbert wrote:

*This message was transferred with a trial version of CommuniGate(tm) Pro*
David Bear <[EMAIL PROTECTED]> writes:
 

I am wondering if scripts in /usr/local/etc/rc.d MUST be owned by root
in order to be run.
   

No.  They have to be executable by root.

 

If I have a daemon on want started, AND I want it to run as user
"DORK", can I have the binary and the startscript owned by user "DORK"
in order to have it started that way?
   

It will run, but it will still run as root.

 

the more I think about this, the more I get confused...
   

Apparently.

 

If a startup script lives in /usr/local/etc/rc.d does its ownership
determine the ownership of the process it starts?
   

No.

 

or is the the owner of the binary the script starts that determines
the owner of the process
   

Not that either.

 

And, if it needs to change ownership, is it up to the program itself
to change who it runs as?  
   

The script can start a program under a different user if it wants.
Many of the standard ones do so, typically using su(1).
 



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


Re: startup scripts in /usr/local/etc/rc.d

2003-12-11 Thread Lowell Gilbert
David Bear <[EMAIL PROTECTED]> writes:

> I am wondering if scripts in /usr/local/etc/rc.d MUST be owned by root
> in order to be run.

No.  They have to be executable by root.

> If I have a daemon on want started, AND I want it to run as user
> "DORK", can I have the binary and the startscript owned by user "DORK"
> in order to have it started that way?

It will run, but it will still run as root.

> the more I think about this, the more I get confused...

Apparently.

> If a startup script lives in /usr/local/etc/rc.d does its ownership
> determine the ownership of the process it starts?

No.

> or is the the owner of the binary the script starts that determines
> the owner of the process

Not that either.

> And, if it needs to change ownership, is it up to the program itself
> to change who it runs as?  

The script can start a program under a different user if it wants.
Many of the standard ones do so, typically using su(1).

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area: 
resume/CV at http://be-well.ilk.org:8088/~lowell/resume/
username/password "public"
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Startup scripts not running on 4.8

2003-07-07 Thread Andy Farkas
On Mon, 7 Jul 2003, Brent Wiese wrote:

> The box is in a remote datacenter so I'm unable to look at the console right
> now. Message log and dmesg are giving no clues as to whats happening.

To find out what gets written to the console, enable this in
/etc/syslog.conf:

# uncomment this to log all writes to /dev/console to /var/log/console.log
console.info/var/log/console.log

Don't forget to:

# touch /var/log/console.log
# kill -HUP `cat /var/run/syslog.pid`

--

 :{ [EMAIL PROTECTED]

Andy Farkas
System Administrator
   Speednet Communications
 http://www.speednet.com.au/



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