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

 
 
LinkBack Thread Tools
 
Old 11-19-2009, 09:02 PM
Amit Dor-Shifer
 
Default interrupting runscripts during startup

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
 
Old 11-19-2009, 10:45 PM
Renat Golubchyk
 
Default interrupting runscripts during startup

On Fri, 20 Nov 2009 00:02:47 +0200 Amit Dor-Shifer <amitds@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)
 
Old 11-20-2009, 02:56 PM
Amit Dor-Shifer
 
Default interrupting runscripts during startup

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

Renat Golubchyk wrote:

On Fri, 20 Nov 2009 00:02:47 +0200 Amit Dor-Shifer <amitds@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
 
Old 11-20-2009, 03:13 PM
Marcus Wanner
 
Default interrupting runscripts during startup

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
 
Old 11-23-2009, 05:19 PM
Alex Schuster
 
Default interrupting runscripts during startup

Renat Golubchyk writes:

> On Fri, 20 Nov 2009 00:02:47 +0200 Amit Dor-Shifer <amitds@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
 

Thread Tools




All times are GMT. The time now is 01:47 PM.

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