FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 08-26-2010, 07:17 PM
"Hugh E Cruickshank"
 
Default rc script not running at boot time

From: James D. Parra Sent: August 26, 2010 11:46
>
> However, upon reboot the service does not start.

Hi James:

I have encounter the same problem and here is what I have done:

1. Add the following lines to the top of you script file:

# chkconfig: 235 99 01
# description: what ever you want here

2. Run chkconfig to "add" the script:

chkconfig --add /etc/rc.d/rc3.d/S50pgstartstop

A Google search on chkconfig should supply you with the reasoning
behind this (much more eloquently than I can).

You might also want to add the following line to your script file:

touch /var/lock/subsys/S50pgstartstop

IIRC this was required in order to the shutdown to work correctly.

HTH

Regards, Hugh

--
Hugh E Cruickshank, Forward Software, www.forward-software.com

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-26-2010, 07:39 PM
 
Default rc script not running at boot time

Hugh E Cruickshank wrote:
> From: James D. Parra Sent: August 26, 2010 11:46
>>
>> However, upon reboot the service does not start.
>
> I have encounter the same problem and here is what I have done:
>
> 1. Add the following lines to the top of you script file:
>
> # chkconfig: 235 99 01
> # description: what ever you want here
>
> 2. Run chkconfig to "add" the script:
>
> chkconfig --add /etc/rc.d/rc3.d/S50pgstartstop
>
> A Google search on chkconfig should supply you with the reasoning
> behind this (much more eloquently than I can).
>
> You might also want to add the following line to your script file:
>
> touch /var/lock/subsys/S50pgstartstop
>
> IIRC this was required in order to the shutdown to work correctly.

This is all very odd. chkconfig, IIUC, merely creates the symbolic links
in /etc/rc.d/rc.[0-6] to /etc/init.d/<scriptname>. If there's already one
in /etc/rc.d/rc3.d that begins with an S, it should have been found by the
startup scripts.

Perhaps you could try chkconfig pgstartstop off, then on, and see if that
works.

I assume that you've checked /var/log/messages for anything occuring
during startup.

mark
mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-26-2010, 07:47 PM
"James D. Parra"
 
Default rc script not running at boot time

From: James D. Parra Sent: August 26, 2010 11:46
>
> However, upon reboot the service does not start.

Hi James:

I have encounter the same problem and here is what I have done:

1. Add the following lines to the top of you script file:

# chkconfig: 235 99 01
# description: what ever you want here

2. Run chkconfig to "add" the script:

chkconfig --add /etc/rc.d/rc3.d/S50pgstartstop

A Google search on chkconfig should supply you with the reasoning
behind this (much more eloquently than I can).

You might also want to add the following line to your script file:

touch /var/lock/subsys/S50pgstartstop

IIRC this was required in order to the shutdown to work correctly.

HTH

Regards, Hugh
~~~~~~~

Many thanks Hugh. Added the above lines to the script and tried to the following;
chkconfig --add /etc/rc.d/rc3.d/S50pgstartstop
error reading information on service S50pgstartstop: No such file or directory
<snip>

[root@ip-10-161-99-142 ~]# ls -l /etc/rc.d/rc3.d/S50pgstartstop
lrwxrwxrwx 1 root root 23 Aug 26 13:28 /etc/rc.d/rc3.d/S50pgstartstop -> /etc/init.d/pgstartstop
<snip>

The script:
#! /bin/sh
# chkconfig: 235 99 01
# description: pgstart & stop
touch /var/lock/subsys/S50pgstartstop
case "$1" in
start) /usr/bin/pgstart ;;
stop) /usr/bin/pgstop ;;
restart) /bin/sh $0 stop
/bin/sh $0 start ;;
*) echo "Usage: $0 {start|stop}"
exit 1;;
esac
<snip>


The file is there. Any clue as to how I can fix this?

Again, many thanks.

James


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-26-2010, 07:54 PM
 
Default rc script not running at boot time

James D. Parra wrote:
<snip>
> chkconfig --add /etc/rc.d/rc3.d/S50pgstartstop
> error reading information on service S50pgstartstop: No such file or
> directory
> <snip>
>
> [root@ip-10-161-99-142 ~]# ls -l /etc/rc.d/rc3.d/S50pgstartstop
> lrwxrwxrwx 1 root root 23 Aug 26 13:28 /etc/rc.d/rc3.d/S50pgstartstop ->
> /etc/init.d/pgstartstop
> <snip>

Dumb question:
ls -l /etc/init.d/pgstartstop
Is it executable?

mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-26-2010, 07:56 PM
"James D. Parra"
 
Default rc script not running at boot time

----- Original Message -----
From: "m roth" <m.roth@5-cent.us>
To: "General Red Hat Linux discussion list" <redhat-list@redhat.com>
Sent: Thursday, August 26, 2010 12:39:37 PM GMT -08:00 US/Canada Pacific
Subject: RE: rc script not running at boot time

Hugh E Cruickshank wrote:
> From: James D. Parra Sent: August 26, 2010 11:46
>>
>> However, upon reboot the service does not start.
>
> I have encounter the same problem and here is what I have done:
>
> 1. Add the following lines to the top of you script file:
>
> # chkconfig: 235 99 01
> # description: what ever you want here
>
> 2. Run chkconfig to "add" the script:
>
> chkconfig --add /etc/rc.d/rc3.d/S50pgstartstop
>
> A Google search on chkconfig should supply you with the reasoning
> behind this (much more eloquently than I can).
>
> You might also want to add the following line to your script file:
>
> touch /var/lock/subsys/S50pgstartstop
>
> IIRC this was required in order to the shutdown to work correctly.

This is all very odd. chkconfig, IIUC, merely creates the symbolic links
in /etc/rc.d/rc.[0-6] to /etc/init.d/<scriptname>. If there's already one
in /etc/rc.d/rc3.d that begins with an S, it should have been found by the
startup scripts.

Perhaps you could try chkconfig pgstartstop off, then on, and see if that
works.

I assume that you've checked /var/log/messages for anything occuring
during startup.

mark

~~~~~~~~

Thank you Mark and Hugh;

Ran 'chkconfig pgstartstop off' then 'on' and it now appears in chkconfig --list;

pgstartstop 0ff 1ff 2n 3n 4n 5n 6ff
<snip>

I'll let you know how the reboot goes.

Best,

James


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-26-2010, 08:07 PM
Tom H
 
Default rc script not running at boot time

On Thu, Aug 26, 2010 at 3:39 PM, <m.roth@5-cent.us> wrote:
> Hugh E Cruickshank wrote:
>> From: James D. Parra Sent: August 26, 2010 11:46
>>>
>>> However, upon reboot the service does not start.
>>
>> I have encounter the same problem and here is what I have done:
>>
>> 1. Add the following lines to the top of you script file:
>>
>> * *# chkconfig: * *235 99 01
>> * *# description: *what ever you want here
>>
>> 2. Run chkconfig to "add" the script:
>>
>> * *chkconfig *--add /etc/rc.d/rc3.d/S50pgstartstop
>>
>> A Google search on chkconfig should supply you with the reasoning
>> behind this (much more eloquently than I can).
>>
>> You might also want to add the following line to your script file:
>>
>> * *touch /var/lock/subsys/S50pgstartstop
>>
>> IIRC this was required in order to the shutdown to work correctly.
>
> This is all very odd. chkconfig, IIUC, merely creates the symbolic links
> in /etc/rc.d/rc.[0-6] to /etc/init.d/<scriptname>. If there's already one
> in /etc/rc.d/rc3.d that begins with an S, it should have been found by the
> startup scripts.
>
> Perhaps you could try chkconfig pgstartstop off, then on, and see if that
> works.

+1 regarding the "S". pgstartstop must depend on a daemon that hasn't
started when its S script is launched.

The 99 and 01 above should take care of that but "chkconfig -add"
should be run on the script in /init.d not rc3.d.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-26-2010, 08:10 PM
"James D. Parra"
 
Default rc script not running at boot time

>
> [root@ip-10-161-99-142 ~]# ls -l /etc/rc.d/rc3.d/S50pgstartstop
> lrwxrwxrwx 1 root root 23 Aug 26 13:28 /etc/rc.d/rc3.d/S50pgstartstop ->
> /etc/init.d/pgstartstop
> <snip>

Dumb question:
ls -l /etc/init.d/pgstartstop
Is it executable?

~~~
Not dumb at all; it was the first thing I checked;

ls -l /etc/init.d/pgstartstop
-rwxr-xr-x 1 root root 259 Aug 26 15:46 /etc/init.d/pgstartstop

James

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 11:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org