From: Thue Janus Kristensen on
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/sshfs
and 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
From: Bob Proulx on
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
From: Arthur Machlas on
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(a)gmail.com> wrote:
> On 7/11/10, Bob Proulx <bob(a)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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTik4wh1AEmfDmbzLRC3alSrJokJDLkhUu32Rpcw7(a)mail.gmail.com
From: Arthur Machlas on
On 7/11/10, Bob Proulx <bob(a)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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTimbpMCW4WZiuBDwQSyTAtDv3cC4DOBVHpSTB4Oq(a)mail.gmail.com