init: remove special-case code for machines with less tham 1 MB of RAM.
function old new delta init_main 920 781 -139 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
ae0cf2a9d7
commit
f958425451
27
init/init.c
27
init/init.c
@ -655,23 +655,22 @@ static void parse_inittab(void)
|
||||
#endif
|
||||
{
|
||||
/* No inittab file - set up some default behavior */
|
||||
/* Reboot on Ctrl-Alt-Del */
|
||||
new_init_action(CTRLALTDEL, "reboot", "");
|
||||
/* Umount all filesystems on halt/reboot */
|
||||
new_init_action(SHUTDOWN, "umount -a -r", "");
|
||||
/* Swapoff on halt/reboot */
|
||||
if (ENABLE_SWAPONOFF)
|
||||
new_init_action(SHUTDOWN, "swapoff -a", "");
|
||||
/* Prepare to restart init when a QUIT is received */
|
||||
new_init_action(RESTART, "init", "");
|
||||
/* Sysinit */
|
||||
new_init_action(SYSINIT, INIT_SCRIPT, "");
|
||||
/* Askfirst shell on tty1-4 */
|
||||
new_init_action(ASKFIRST, bb_default_login_shell, "");
|
||||
//TODO: VC_1 instead of ""? "" is console -> ctty problems -> angry users
|
||||
new_init_action(ASKFIRST, bb_default_login_shell, VC_2);
|
||||
new_init_action(ASKFIRST, bb_default_login_shell, VC_3);
|
||||
new_init_action(ASKFIRST, bb_default_login_shell, VC_4);
|
||||
/* sysinit */
|
||||
new_init_action(SYSINIT, INIT_SCRIPT, "");
|
||||
/* Reboot on Ctrl-Alt-Del */
|
||||
new_init_action(CTRLALTDEL, "reboot", "");
|
||||
/* Umount all filesystems on halt/reboot */
|
||||
new_init_action(SHUTDOWN, "umount -a -r", "");
|
||||
/* Swapoff on halt/reboot */
|
||||
new_init_action(SHUTDOWN, "swapoff -a", "");
|
||||
/* Restart init when a QUIT is received */
|
||||
new_init_action(RESTART, "init", "");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1058,10 +1057,13 @@ int init_main(int argc UNUSED_PARAM, char **argv)
|
||||
message(L_CONSOLE | L_LOG, "init started: %s", bb_banner);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* It's 2013, does anyone really still depend on this? */
|
||||
/* If you do, consider adding swapon to sysinot actions then! */
|
||||
/* struct sysinfo is linux-specific */
|
||||
# ifdef __linux__
|
||||
/* Make sure there is enough memory to do something useful. */
|
||||
if (ENABLE_SWAPONOFF) {
|
||||
/*if (ENABLE_SWAPONOFF) - WRONG: we may have non-bbox swapon*/ {
|
||||
struct sysinfo info;
|
||||
|
||||
if (sysinfo(&info) == 0
|
||||
@ -1075,6 +1077,7 @@ int init_main(int argc UNUSED_PARAM, char **argv)
|
||||
run_actions(SYSINIT); /* wait and removing */
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Check if we are supposed to be in single user mode */
|
||||
|
Loading…
x
Reference in New Issue
Block a user