/[baselayout]/trunk/src/rc.c
Gentoo

Diff of /trunk/src/rc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2928 Revision 2936
455 strcmp (PREVLEVEL, "N") != 0 && 455 strcmp (PREVLEVEL, "N") != 0 &&
456 strcmp (PREVLEVEL, "S") != 0 && 456 strcmp (PREVLEVEL, "S") != 0 &&
457 strcmp (PREVLEVEL, "1") != 0) 457 strcmp (PREVLEVEL, "1") != 0)
458 return (false); 458 return (false);
459 459
460 if (! rc_is_env ("RC_INTERACTIVE", "yes")) 460 if (! rc_env_bool ("RC_INTERACTIVE"))
461 return (false); 461 return (false);
462 462
463 c = read_key (false); 463 c = read_key (false);
464 return ((c == 'I' || c == 'i') ? true : false); 464 return ((c == 'I' || c == 'i') ? true : false);
465} 465}
917 "\n Copyright 1999-2007 Gentoo Foundation; " 917 "\n Copyright 1999-2007 Gentoo Foundation; "
918 "Distributed under the GPLv2\n\n", 918 "Distributed under the GPLv2\n\n",
919 ecolor (ecolor_good), uts.sysname, ecolor (ecolor_bracket), 919 ecolor (ecolor_good), uts.sysname, ecolor (ecolor_bracket),
920 ecolor (ecolor_normal)); 920 ecolor (ecolor_normal));
921 921
922 if (rc_is_env ("RC_INTERACTIVE", "yes")) 922 if (rc_env_bool ("RC_INTERACTIVE"))
923 printf ("Press %sI%s to enter interactive boot mode\n\n", 923 printf ("Press %sI%s to enter interactive boot mode\n\n",
924 ecolor (ecolor_good), ecolor (ecolor_normal)); 924 ecolor (ecolor_good), ecolor (ecolor_normal));
925 925
926 setenv ("RC_SOFTLEVEL", newlevel, 1); 926 setenv ("RC_SOFTLEVEL", newlevel, 1);
927 rc_plugin_run (rc_hook_runlevel_start_in, newlevel); 927 rc_plugin_run (rc_hook_runlevel_start_in, newlevel);
1054 the device node to the init script to simulate the coldplug into 1054 the device node to the init script to simulate the coldplug into
1055 runlevel for our dependency tree to work. */ 1055 runlevel for our dependency tree to work. */
1056 if (newlevel && strcmp (newlevel, bootlevel) == 0 && 1056 if (newlevel && strcmp (newlevel, bootlevel) == 0 &&
1057 (strcmp (runlevel, RC_LEVEL_SINGLE) == 0 || 1057 (strcmp (runlevel, RC_LEVEL_SINGLE) == 0 ||
1058 strcmp (runlevel, RC_LEVEL_SYSINIT) == 0) && 1058 strcmp (runlevel, RC_LEVEL_SYSINIT) == 0) &&
1059 rc_is_env ("RC_COLDPLUG", "yes")) 1059 rc_env_bool ("RC_COLDPLUG"))
1060 { 1060 {
1061#if defined(__DragonFly__) || defined(__FreeBSD__) 1061#if defined(__DragonFly__) || defined(__FreeBSD__)
1062 /* The net interfaces are easy - they're all in net /dev/net :) */ 1062 /* The net interfaces are easy - they're all in net /dev/net :) */
1063 start_services = rc_ls_dir ("/dev/net", 0); 1063 start_services = rc_ls_dir ("/dev/net", 0);
1064 STRLIST_FOREACH (start_services, service, i) { 1064 STRLIST_FOREACH (start_services, service, i) {
1184 continue; 1184 continue;
1185 1185
1186 /* We always stop the service when in these runlevels */ 1186 /* We always stop the service when in these runlevels */
1187 if (going_down) { 1187 if (going_down) {
1188 pid_t pid = rc_stop_service (service); 1188 pid_t pid = rc_stop_service (service);
1189 if (pid > 0 && ! rc_is_env ("RC_PARALLEL", "yes")) 1189 if (pid > 0 && ! rc_env_bool ("RC_PARALLEL"))
1190 rc_waitpid (pid); 1190 rc_waitpid (pid);
1191 continue; 1191 continue;
1192 } 1192 }
1193 1193
1194 /* If we're in the start list then don't bother stopping us */ 1194 /* If we're in the start list then don't bother stopping us */
1249 deporder = NULL; 1249 deporder = NULL;
1250 1250
1251 /* After all that we can finally stop the blighter! */ 1251 /* After all that we can finally stop the blighter! */
1252 if (! found) { 1252 if (! found) {
1253 pid_t pid = rc_stop_service (service); 1253 pid_t pid = rc_stop_service (service);
1254 if (pid > 0 && ! rc_is_env ("RC_PARALLEL", "yes")) 1254 if (pid > 0 && ! rc_env_bool ("RC_PARALLEL"))
1255 rc_waitpid (pid); 1255 rc_waitpid (pid);
1256 } 1256 }
1257 } 1257 }
1258 rc_strlist_free (types); 1258 rc_strlist_free (types);
1259 types = NULL; 1259 types = NULL;
1350 1350
1351 /* Remember the pid if we're running in parallel */ 1351 /* Remember the pid if we're running in parallel */
1352 if ((pid = rc_start_service (service))) 1352 if ((pid = rc_start_service (service)))
1353 add_pid (pid); 1353 add_pid (pid);
1354 1354
1355 if (! rc_is_env ("RC_PARALLEL", "yes")) { 1355 if (! rc_env_bool ("RC_PARALLEL")) {
1356 rc_waitpid (pid); 1356 rc_waitpid (pid);
1357 remove_pid (pid); 1357 remove_pid (pid);
1358 } 1358 }
1359 } 1359 }
1360 } 1360 }

Legend:
Removed from v.2928  
changed lines
  Added in v.2936

  ViewVC Help
Powered by ViewVC 1.1.20