Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] [OT] interrupting runscripts during startup

0 views
Skip to first unread message

Amit Dor-Shifer

unread,
Nov 19, 2009, 5:20:02 PM11/19/09
to
Hi all.

When hitting Ctrl-C during startup, I manage to interrupt services at
the early stages of init, yet later-on I can no-longer do this. It seems
that up till runlevel 'default', services can be hit with the interrupt.
I'm wondering where is this behavior being set, and whether I can enable
the interruption by SIGINT in 'default' level runscripts (e.g.
'local.start'). I'm suspecting this is somewhere in /sbin/init, but
can't ascertain this.
Anyone knows?
thanks,
Amit

Renat Golubchyk

unread,
Nov 19, 2009, 6:50:01 PM11/19/09
to
On Fri, 20 Nov 2009 00:02:47 +0200 Amit Dor-Shifer <ami...@oversi.com>
wrote:

> When hitting Ctrl-C during startup, I manage to interrupt services at
> the early stages of init, yet later-on I can no-longer do this. It
> seems that up till runlevel 'default', services can be hit with the
> interrupt.

Why do you want to stop services by hitting CTRL-C ? Services are
shell scripts. Hitting CTRL-C stops the script somewhere in the
middle during its execution. Everything that was done until that moment
won't be automagically undone. There can be files left , and processes
already started will still run. That's not clean.

Better use the interactive init feature. Just hit 'I' when init starts
(init even tells you, that you can do it) and choose which services to
start by hitting 'y' and 'n'.


Cheers,
Renat

--
Probleme kann man niemals mit derselben Denkweise loesen,
durch die sie entstanden sind.
(Einstein)

signature.asc

Amit Dor-Shifer

unread,
Nov 20, 2009, 11:00:02 AM11/20/09
to
My interest is foremost trivial. Not necessarily related to the
application of such interrupts.
Nevertheless, with regards to the post:
* runscripts can (and AFAIK do) trap and handle SIGINT.
* the interactive mode is ok for interrupting the init process between
scripts. But I can't interrupt a script while it's running with 'I', and
with SIGINT, I can.

Amit

Marcus Wanner

unread,
Nov 20, 2009, 1:10:02 PM11/20/09
to
On 11/19/2009 6:45 PM, Renat Golubchyk wrote:
> Better use the interactive init feature. Just hit 'I' when init starts
> (init even tells you, that you can do it) and choose which services to
> start by hitting 'y' and 'n'
(actually 1, 2, 3, and 4)

Marcus

Alex Schuster

unread,
Nov 23, 2009, 3:10:03 PM11/23/09
to
Renat Golubchyk writes:

> On Fri, 20 Nov 2009 00:02:47 +0200 Amit Dor-Shifer <ami...@oversi.com>
> wrote:
> > When hitting Ctrl-C during startup, I manage to interrupt services at
> > the early stages of init, yet later-on I can no-longer do this. It
> > seems that up till runlevel 'default', services can be hit with the
> > interrupt.
>
> Why do you want to stop services by hitting CTRL-C ?

I do this when a periodic files system check of a large partition kicks in
and I do not want to spend the time waiting for it.
Other things I like to interrupt are long timeouts, e.g. while some
program waits for a server to respond, but I do not have an internet
connection at the moment. I had this problem with an annoyingly large NTP
timeout (it seems to be much smaller these days), and I wished I could
have stopped it.

Wonko

0 new messages