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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-11-2010, 08:01 PM
Thue Janus Kristensen
 
Default Getting my init-script to run at the correct time

I have a custom initscript�/etc/init.d/sshfs , which mounts and unmounts sshfs from my server.
I am having trouble getting it to run at the right place in the shutdown sequence. It used to work, but recently stopped working for no apparent reason.

I have a symlink��/etc/rc0.d/K01sshfs -> ../init.d/sshfsand it runs, but for whatever reason it runs after for example���K03sendsigs -> ../init.d/sendsigs
Which I think is what causes it to fail, because the fuse process has been killed by sendsigs.
I though that perhaps the problem was that I should add a init header, so I added

### BEGIN INIT INFO � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
# Provides: � � � � �sshfs � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ��
# Required-Start: � �$local_fs networking $named $network � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
# Required-Stop: � � $local_fs networking $named $network � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
# Default-Start: � � S � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ��
# Default-Stop: � � �0 6 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ��
# X-Stop-After: � � �thuebckup � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ��
# Short-Description: sshfs � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ��
# Description: � � � mount /home/thue/sorteret, /home/thue/thuedata � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
### END INIT INFO
But it did not help. I also tried adding postfix to the Required-Stop line, but "sshfs stop" is still run after postfix
# Required-Stop: � � $local_fs networking $named $network postfix

I can't find any relevant help in /etc/init.d/README or�http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit�. Can anybody on this list help me?

Regards, Thue
 
Old 07-12-2010, 02:20 AM
Bob Proulx
 
Default Getting my init-script to run at the correct time

Thue Janus Kristensen wrote:
> I am having trouble getting it to run at the right place in the shutdown
> sequence. It used to work, but recently stopped working for no apparent
> reason.

What Debian release are you running? Lenny, Sqeeze or Sid? In Lenny
the startup and shutdown is still the traditional symlink number based
system. But Sid has migrated to parallel booting by default. If you
are running Squeeze/Sid then this will affect you. Here is the
announcement of the change in Sid.

http://lists.debian.org/debian-devel-announce/2010/05/msg00009.html

Bob
 
Old 07-15-2010, 06:20 PM
Arthur Machlas
 
Default Getting my init-script to run at the correct time

On 7/11/10, Bob Proulx <bob@proulx.com> wrote:
> Thue Janus Kristensen wrote:
>> I am having trouble getting it to run at the right place in the shutdown
>> sequence. It used to work, but recently stopped working for no apparent
>> reason.
## Changes to init script
# Required start:
# Required stop: $custom

## Add to insserv.con
$custom script1 script2 script3

With script# being scripts that are started under /etc/init.d


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTimbpMCW4WZiuBDwQSyTAtDv3cC4DOBVHpSTB4Oq@mail .gmail.com">http://lists.debian.org/AANLkTimbpMCW4WZiuBDwQSyTAtDv3cC4DOBVHpSTB4Oq@mail .gmail.com
 
Old 07-15-2010, 06:21 PM
Arthur Machlas
 
Default Getting my init-script to run at the correct time

Forgot to include this info:
Squeeze is parallel by default as well now. I know this because I'm
running it. It also has insserv installed by default, which handles
the ordering of scripts, so manually changing the number will work for
a short time, if at all, and be overwritten by any updates to insserv,
or basically anytime insserv is called, for example when insalled or
removing scripts from /etc/init.d

To get it to run at the correct time you need to include some lsb
headers in the inti script, then create a new level in insserv.conf.

And there is a typo in my original post, insserv.con should be conf.


On 7/15/10, Arthur Machlas <arthur.machlas@gmail.com> wrote:
> On 7/11/10, Bob Proulx <bob@proulx.com> wrote:
>> Thue Janus Kristensen wrote:
>>> I am having trouble getting it to run at the right place in the shutdown
>>> sequence. It used to work, but recently stopped working for no apparent
>>> reason.
> ## Changes to init script
> # Required start:
> # Required stop: $custom
>
> ## Add to insserv.con
> $custom script1 script2 script3
>
> With script# being scripts that are started under /etc/init.d
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTik4wh1AEmfDmbzLRC3alSrJokJDLkhUu32Rpcw7@mail .gmail.com">http://lists.debian.org/AANLkTik4wh1AEmfDmbzLRC3alSrJokJDLkhUu32Rpcw7@mail .gmail.com
 

Thread Tools




All times are GMT. The time now is 04:36 PM.

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