aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-05-14 12:48:37 +0000
committerRoy Marples <roy@marples.name>2007-05-14 12:48:37 +0000
commit14c59d4071530492a0cf385db026a5152b3502d1 (patch)
tree0e7b292ebfb57c4e8364ba76df3b8569a12bb3a5
parentbbfb7bc409bc07b6362bb975d4853df2b7896401 (diff)
RC_INTERACTIVE now works, #178331.
-rw-r--r--ChangeLog3
-rw-r--r--src/rc.c12
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b9ee731..d791f6b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,9 +3,10 @@
14 May 2007; Roy Marples <uberlord@gentoo.org>:
+ RC_INTERACTIVE now works, #178331.
Add --startas back to s-s-d, #175980, #175981.
Allow time for pidfiles to be created, #178274.
- Use int instead of char for getopt, #178084 thanks to drizztbsd.
+ Use int instead of char for getopt, #178084 thanks to drizztbsd.
11 May 2007; Roy Marples <uberlord@gentoo.org>:
diff --git a/src/rc.c b/src/rc.c
index 946a7a94..793010f0 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -367,7 +367,12 @@ static char read_key (bool block)
static bool want_interactive (void)
{
- char c = read_key (false);
+ char c;
+
+ if (! rc_is_env ("RC_INTERACTIVE", "yes"))
+ return (false);
+
+ c = read_key (false);
return ((c == 'I' || c == 'i') ? true : false);
}
@@ -741,8 +746,9 @@ int main (int argc, char **argv)
ecolor (ecolor_good), uts.sysname, ecolor (ecolor_bracket),
ecolor (ecolor_normal));
- printf ("Press %sI%s to enter interactive boot mode\n\n",
- ecolor (ecolor_good), ecolor (ecolor_normal));
+ if (rc_is_env ("RC_INTERACTIVE", "yes"))
+ printf ("Press %sI%s to enter interactive boot mode\n\n",
+ ecolor (ecolor_good), ecolor (ecolor_normal));
setenv ("RC_SOFTLEVEL", newlevel, 1);
rc_plugin_run (rc_hook_runlevel_start_in, newlevel);