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

 
 
LinkBack Thread Tools
 
Old 12-10-2008, 07:50 PM
Kailesh Mussai
 
Default init.d scripts for shutdown and reboot

Dear all,

I am trying to understand how ubuntu does a shutdown. From what I
understand in the rc0.d, here is a part of ls -l:

root@turkana:/etc/rc0.d# ls -l

lrwxrwxrwx 1 root root 13 2008-10-10 11:45 K01gdm -> ../init.d/gdm
---snip----
lrwxrwxrwx 1 root root 22 2008-10-10 11:45 S31umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root 17 2008-10-14 10:30 S32portmap -> ../init.d/portmap
lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S35networking -> ../init.d/networking
lrwxrwxrwx 1 root root 18 2008-10-10 11:45 S40umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S60umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root 14 2008-10-10 11:45 S90halt -> ../init.d/halt

The init scripts umountnfs.sh, umountfs, umountroot do nothing when
started but only when stopped, an example is:

root@turkana:/etc/rc0.d# /etc/init.d/umountfs start # No-op

The reason I am asking is, I have network boot hosts which uses there
own local disk with aufs and having trouble umounting those local
mounts.

I'll appreciate any help, if I am unclear, please let me know.

Best regards,
Kailesh

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-10-2008, 11:28 PM
Cameron Hutchison
 
Default init.d scripts for shutdown and reboot

Kailesh Mussai <kmussa@cs.mcgill.ca> writes:

>I am trying to understand how ubuntu does a shutdown. From what I
>understand in the rc0.d, here is a part of ls -l:

>root@turkana:/etc/rc0.d# ls -l

>lrwxrwxrwx 1 root root 13 2008-10-10 11:45 K01gdm -> ../init.d/gdm
>---snip----
>lrwxrwxrwx 1 root root 22 2008-10-10 11:45 S31umountnfs.sh -> ../init.d/umountnfs.sh
>lrwxrwxrwx 1 root root 17 2008-10-14 10:30 S32portmap -> ../init.d/portmap
>lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S35networking -> ../init.d/networking
>lrwxrwxrwx 1 root root 18 2008-10-10 11:45 S40umountfs -> ../init.d/umountfs
>lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S60umountroot -> ../init.d/umountroot
>lrwxrwxrwx 1 root root 14 2008-10-10 11:45 S90halt -> ../init.d/halt

>The init scripts umountnfs.sh, umountfs, umountroot do nothing when
>started but only when stopped, an example is:

>root@turkana:/etc/rc0.d# /etc/init.d/umountfs start # No-op

>The reason I am asking is,

I'm not sure what you're asking, as there is no question in your
message.

It may help you to know that in runlevels 0 and 6, the S* scripts are
run with the "stop" argument. In the other runlevels, the S* scripts are
run with the "start" argument. For all runlevels, K* scripts are run
with the "stop" argument.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-11-2008, 01:40 PM
Kailesh Mussai
 
Default init.d scripts for shutdown and reboot

On Thu, Dec 11, 2008 at 12:28:22AM -0000, Cameron Hutchison wrote:

> Kailesh Mussai <kmussa@cs.mcgill.ca> writes:
>
> >I am trying to understand how ubuntu does a shutdown. From what I
> >understand in the rc0.d, here is a part of ls -l:
>
> >root@turkana:/etc/rc0.d# ls -l
>
> >lrwxrwxrwx 1 root root 13 2008-10-10 11:45 K01gdm -> ../init.d/gdm
> >---snip----
> >lrwxrwxrwx 1 root root 22 2008-10-10 11:45 S31umountnfs.sh -> ../init.d/umountnfs.sh
> >lrwxrwxrwx 1 root root 17 2008-10-14 10:30 S32portmap -> ../init.d/portmap
> >lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S35networking -> ../init.d/networking
> >lrwxrwxrwx 1 root root 18 2008-10-10 11:45 S40umountfs -> ../init.d/umountfs
> >lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S60umountroot -> ../init.d/umountroot
> >lrwxrwxrwx 1 root root 14 2008-10-10 11:45 S90halt -> ../init.d/halt
>
> >The init scripts umountnfs.sh, umountfs, umountroot do nothing when
> >started but only when stopped, an example is:
>
> >root@turkana:/etc/rc0.d# /etc/init.d/umountfs start # No-op
>
> >The reason I am asking is,
>
> I'm not sure what you're asking, as there is no question in your
> message.
>
> It may help you to know that in runlevels 0 and 6, the S* scripts are
> run with the "stop" argument. In the other runlevels, the S* scripts are
> run with the "start" argument. For all runlevels, K* scripts are run
> with the "stop" argument.
>
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
+-------------------

Thank you Cameron, that does help me understand why they would have the
init.d/umount* as S* scripts in runlevel 0 and 6.

I am trying to understand the shutdown process, as our own custom setup
is failing to umount the local drive giving us "resource is busy" before
shutting down.

Hence my question is how does the shutdown process works, especially the
part where the unmounting is concerned?

Best,
Kailesh

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-11-2008, 02:13 PM
"Tommy Trussell"
 
Default init.d scripts for shutdown and reboot

On Thu, Dec 11, 2008 at 8:40 AM, Kailesh Mussai <kmussa@cs.mcgill.ca> wrote:
> On Thu, Dec 11, 2008 at 12:28:22AM -0000, Cameron Hutchison wrote:
>
>> Kailesh Mussai <kmussa@cs.mcgill.ca> writes:
>>
>> >I am trying to understand how ubuntu does a shutdown. From what I
>> >understand in the rc0.d, here is a part of ls -l:
>>
>> >root@turkana:/etc/rc0.d# ls -l
>>
>> >lrwxrwxrwx 1 root root 13 2008-10-10 11:45 K01gdm -> ../init.d/gdm
>> >---snip----
>> >lrwxrwxrwx 1 root root 22 2008-10-10 11:45 S31umountnfs.sh -> ../init.d/umountnfs.sh
>> >lrwxrwxrwx 1 root root 17 2008-10-14 10:30 S32portmap -> ../init.d/portmap
>> >lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S35networking -> ../init.d/networking
>> >lrwxrwxrwx 1 root root 18 2008-10-10 11:45 S40umountfs -> ../init.d/umountfs
>> >lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S60umountroot -> ../init.d/umountroot
>> >lrwxrwxrwx 1 root root 14 2008-10-10 11:45 S90halt -> ../init.d/halt
>>
>> >The init scripts umountnfs.sh, umountfs, umountroot do nothing when
>> >started but only when stopped, an example is:
>>
>> >root@turkana:/etc/rc0.d# /etc/init.d/umountfs start # No-op
>>
>> >The reason I am asking is,
>>
>> I'm not sure what you're asking, as there is no question in your
>> message.
>>
>> It may help you to know that in runlevels 0 and 6, the S* scripts are
>> run with the "stop" argument. In the other runlevels, the S* scripts are
>> run with the "start" argument. For all runlevels, K* scripts are run
>> with the "stop" argument.
>>
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> +-------------------
>
> Thank you Cameron, that does help me understand why they would have the
> init.d/umount* as S* scripts in runlevel 0 and 6.
>
> I am trying to understand the shutdown process, as our own custom setup
> is failing to umount the local drive giving us "resource is busy" before
> shutting down.
>
> Hence my question is how does the shutdown process works, especially the
> part where the unmounting is concerned?
>
> Best,
> Kailesh

If you have a test or non-production system with the hardware you are
looking at, how about opening a console window and playing around with
it?

You could add some diagnostic messages to some of the scripts if
you're not sure they're being called, and watch for your messages to
appear when you change runlevels.

One way to change your runlevels is using the telinit command

to go to runlevel 3

# telinit 3

or to go to runlevel 0

# telinit 0

BY THE WAY -- the # means a root prompt. You can get there by
activating root OR by using any of the several sudo tricks to imitate
it. (or you can prepend "sudo" to any of the lines above)

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-11-2008, 02:14 PM
"Tommy Trussell"
 
Default init.d scripts for shutdown and reboot

amendment -- don't do this at a console WINDOW -- go to a virtual
console by pressing Ctrl-Alt F1

On Thu, Dec 11, 2008 at 9:13 AM, Tommy Trussell
<tommy.trussell@gmail.com> wrote:
> On Thu, Dec 11, 2008 at 8:40 AM, Kailesh Mussai <kmussa@cs.mcgill.ca> wrote:
>> On Thu, Dec 11, 2008 at 12:28:22AM -0000, Cameron Hutchison wrote:
>>
>>> Kailesh Mussai <kmussa@cs.mcgill.ca> writes:
>>>
>>> >I am trying to understand how ubuntu does a shutdown. From what I
>>> >understand in the rc0.d, here is a part of ls -l:
>>>
>>> >root@turkana:/etc/rc0.d# ls -l
>>>
>>> >lrwxrwxrwx 1 root root 13 2008-10-10 11:45 K01gdm -> ../init.d/gdm
>>> >---snip----
>>> >lrwxrwxrwx 1 root root 22 2008-10-10 11:45 S31umountnfs.sh -> ../init.d/umountnfs.sh
>>> >lrwxrwxrwx 1 root root 17 2008-10-14 10:30 S32portmap -> ../init.d/portmap
>>> >lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S35networking -> ../init.d/networking
>>> >lrwxrwxrwx 1 root root 18 2008-10-10 11:45 S40umountfs -> ../init.d/umountfs
>>> >lrwxrwxrwx 1 root root 20 2008-10-10 11:45 S60umountroot -> ../init.d/umountroot
>>> >lrwxrwxrwx 1 root root 14 2008-10-10 11:45 S90halt -> ../init.d/halt
>>>
>>> >The init scripts umountnfs.sh, umountfs, umountroot do nothing when
>>> >started but only when stopped, an example is:
>>>
>>> >root@turkana:/etc/rc0.d# /etc/init.d/umountfs start # No-op
>>>
>>> >The reason I am asking is,
>>>
>>> I'm not sure what you're asking, as there is no question in your
>>> message.
>>>
>>> It may help you to know that in runlevels 0 and 6, the S* scripts are
>>> run with the "stop" argument. In the other runlevels, the S* scripts are
>>> run with the "start" argument. For all runlevels, K* scripts are run
>>> with the "stop" argument.
>>>
>>>
>>> --
>>> ubuntu-users mailing list
>>> ubuntu-users@lists.ubuntu.com
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>> +-------------------
>>
>> Thank you Cameron, that does help me understand why they would have the
>> init.d/umount* as S* scripts in runlevel 0 and 6.
>>
>> I am trying to understand the shutdown process, as our own custom setup
>> is failing to umount the local drive giving us "resource is busy" before
>> shutting down.
>>
>> Hence my question is how does the shutdown process works, especially the
>> part where the unmounting is concerned?
>>
>> Best,
>> Kailesh
>
> If you have a test or non-production system with the hardware you are
> looking at, how about opening a console window and playing around with
> it?
>
> You could add some diagnostic messages to some of the scripts if
> you're not sure they're being called, and watch for your messages to
> appear when you change runlevels.
>
> One way to change your runlevels is using the telinit command
>
> to go to runlevel 3
>
> # telinit 3
>
> or to go to runlevel 0
>
> # telinit 0
>
> BY THE WAY -- the # means a root prompt. You can get there by
> activating root OR by using any of the several sudo tricks to imitate
> it. (or you can prepend "sudo" to any of the lines above)
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




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

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