Gentoo Archives: gentoo-user

From: Amit Dor-Shifer <amitds@××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] interrupting runscripts during startup
Date: Fri, 20 Nov 2009 15:56:28
Message-Id: 4B06BC12.6060809@oversi.com
In Reply to: Re: [gentoo-user] [OT] interrupting runscripts during startup by Renat Golubchyk
1 My interest is foremost trivial. Not necessarily related to the
2 application of such interrupts.
3 Nevertheless, with regards to the post:
4 * runscripts can (and AFAIK do) trap and handle SIGINT.
5 * the interactive mode is ok for interrupting the init process between
6 scripts. But I can't interrupt a script while it's running with 'I', and
7 with SIGINT, I can.
8
9 Amit
10
11 Renat Golubchyk wrote:
12 > On Fri, 20 Nov 2009 00:02:47 +0200 Amit Dor-Shifer <amitds@××××××.com>
13 > wrote:
14 >
15 >> When hitting Ctrl-C during startup, I manage to interrupt services at
16 >> the early stages of init, yet later-on I can no-longer do this. It
17 >> seems that up till runlevel 'default', services can be hit with the
18 >> interrupt.
19 >>
20 >
21 > Why do you want to stop services by hitting CTRL-C ? Services are
22 > shell scripts. Hitting CTRL-C stops the script somewhere in the
23 > middle during its execution. Everything that was done until that moment
24 > won't be automagically undone. There can be files left , and processes
25 > already started will still run. That's not clean.
26 >
27 > Better use the interactive init feature. Just hit 'I' when init starts
28 > (init even tells you, that you can do it) and choose which services to
29 > start by hitting 'y' and 'n'.
30 >
31 >
32 > Cheers,
33 > Renat
34 >
35 >