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

2009-11-23 Thread Alex Schuster
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



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

2009-11-20 Thread Amit Dor-Shifer
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 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

  




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

2009-11-20 Thread Marcus Wanner

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



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

2009-11-19 Thread Renat Golubchyk
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
Description: PGP signature