-P133 32meg RAM
-kernel 2.0.35
-ip masqs between the internet and my internal network.
The power in my apartment went out and my ups was about to fail. I
typed "shutdown -h now" <enter>. The machine shutdown and halted. It
said, The system is halted, and System Halted. My ups never did die.
The curious thing was that when the power came back on I found that my
computer was still routing traffic to the internet. Is this normal
behaviors for a computer that has been halted? Is this a kernel
problem, or specific to my machine(or my kernel)?
--
--Paul
Linux: For IQs higher than 95 or 98 !
Def'n LILO(li-lo) n The most dangerous virus known to Microsoft.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
> The power in my apartment went out and my ups was about to fail. I
> typed "shutdown -h now" <enter>. The machine shutdown and halted. It
> said, The system is halted, and System Halted. My ups never did die.
> The curious thing was that when the power came back on I found that my
> computer was still routing traffic to the internet. Is this normal
> behaviors for a computer that has been halted? Is this a kernel
> problem, or specific to my machine(or my kernel)?
If your shutdown scripts don't delete routes or bring the interfaces down,
this is the normal, expected behavior. A "shutdown" in most distributions
involves syncing and unmounting all filesystems and terminating all
processes, but the interrupt handlers and bottom-half scheduler (the
things that do routing) stay active.
I know some people who use this trick to "hack-proof" their home
firewalls/routers: once the routes are set up, userspace shuts down
completely, so there are no root processes to hack ;-)
If this behavior is undesirable in your environment, modify your shutdown
scripts to delete the routes and down the interfaces.
Adam
--
You crucify all honesty \\Adam D. Bradley artd...@cs.bu.edu
No signs you see do you believe \\Boston University Computer Science
And all your words just twist and turn\\ Grad Student and Linux Hacker
Reviving just to crash and burn \\ <><
---------> Why can't you listen as love screams everywhere? <--------
Newer versions of sysvinit solved this. halt(1) has a flag that tells
it to shutdown all network interfaces before halting [-i]. Make
sure your shutdown script calls "halt -i" (or even "halt -i -p").
This is the default in Debian 2.0, I don't know about RedHat.
Mike.
--
"Did I ever tell you about the illusion of free will?"
-- Sheriff Lucas Buck, ultimate BOFH.
It's always been the normal behaviour of the kernel, until someone changed it
recently in 2.1 kernels without documenting the reason for doing so.
In 2.0, and most 2.1 kernels, 'shutdown -h' will kill all the user-space tasks,
but the kernel itself will remain alive. As routing is a simple function
performed by the kernel alone, it will continue to happen.
I've been known to use this fact in embedded systems, which have a custom
/sbin/init which will set up the interfaces and enable routing, but then just
exits. (Crack that then)
I keep asking why the behaviour was changed, but nobody seems to have owned up
to it yet, let alone given their reasons for doing so.
In recent 2.1 kernels, you'll find that the kernel hangs completely after init
dies. So if you hit SysRq-L, which kills all tasks, you can't even sync and
unmount your disks before rebooting. I consider _that_ to be a bug.
---- ---- ----
David Woodhouse David.W...@mvhi.com Office: (+44) 1223 810302
Project Leader, Process Information Systems Mobile: (+44) 976 658355
Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
finger dw...@ferret.lmh.ox.ac.uk for PGP key.
Or 'upgrade' to 2.1.12x, which someone has broken, so it just hangs when init
dies.
Then later versions of the kernel broke it again.
New 2.1 kernels will hang as soon as init exits, and not even let you sync and
unmount the disks.
RFC 1122 and 1123: The system SHALL NOT BY DEFAULT route between
its interfaces. The 2.0 does violate those, and at it the routing
must be explicitely turned off. 2.1/2.2 by default do not route,
and to turn it on you need to do following command:
echo 1 > /proc/sys/net/ipv4/ip_forward
> ---- ---- ----
> David Woodhouse David.W...@mvhi.com Office: (+44) 1223 810302
/Matti Aarnio <matti....@sonera.fi>
On Wed, 28 Oct 1998, Paul wrote:
> I was told to post this here, so here goes.
>
> -P133 32meg RAM
> -kernel 2.0.35
> -ip masqs between the internet and my internal network.
>
> The power in my apartment went out and my ups was about to fail. I
> typed "shutdown -h now" <enter>. The machine shutdown and halted. It
> said, The system is halted, and System Halted. My ups never did die.
> The curious thing was that when the power came back on I found that my
> computer was still routing traffic to the internet. Is this normal
> behaviors for a computer that has been halted? Is this a kernel
> problem, or specific to my machine(or my kernel)?
>
>
> --
> --Paul
> Linux: For IQs higher than 95 or 98 !
>
> Def'n LILO(li-lo) n The most dangerous virus known to Microsoft.
>
Shouldn't shutdown scripts ifconfig-down the interfaces anyway ?
At least mine do,
Stefan
|> paul.h...@sheridanc.on.ca said:
|> > The power in my apartment went out and my ups was about to fail. I
|> > typed "shutdown -h now" <enter>. The machine shutdown and halted. It
|> > said, The system is halted, and System Halted. My ups never did die.
|> > The curious thing was that when the power came back on I found that my
|> > computer was still routing traffic to the internet. Is this normal
|> > behaviors for a computer that has been halted? Is this a kernel
|> > problem, or specific to my machine(or my kernel)?
|>
|> It's always been the normal behaviour of the kernel, until someone changed it
|> recently in 2.1 kernels without documenting the reason for doing so.
|>
|> In 2.0, and most 2.1 kernels, 'shutdown -h' will kill all the user-space tasks,
|> but the kernel itself will remain alive. As routing is a simple function
|> performed by the kernel alone, it will continue to happen.
|>
|> I've been known to use this fact in embedded systems, which have a custom
|> /sbin/init which will set up the interfaces and enable routing, but then just
|> exits. (Crack that then)
|>
|> I keep asking why the behaviour was changed, but nobody seems to have owned up
|> to it yet, let alone given their reasons for doing so.
|>
|> In recent 2.1 kernels, you'll find that the kernel hangs completely after init
|> dies. So if you hit SysRq-L, which kills all tasks, you can't even sync and
|> unmount your disks before rebooting. I consider _that_ to be a bug.
Then why don't you just call reboot instead of exit in init?
--
Andreas Schwab "And now for something
sch...@issan.cs.uni-dortmund.de completely different"
sch...@gnu.org