*/
#include "busybox.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <errno.h>
#include <paths.h>
#include <signal.h>
-#include <stdarg.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
#include <sys/ioctl.h>
-#include <sys/types.h>
#include <sys/wait.h>
#include <sys/reboot.h>
#include "init_shared.h"
-
#ifdef CONFIG_SYSLOGD
# include <sys/syslog.h>
#endif
-
-#ifdef CONFIG_SELINUX
-# include <selinux/selinux.h>
-#endif /* CONFIG_SELINUX */
-
-
#define INIT_BUFFS_SIZE 256
/* From <linux/vt.h> */
int reserved[1];
};
-
#ifndef _PATH_STDPATH
#define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
#endif
#include <sys/resource.h>
#endif
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-
#define INITTAB "/etc/inittab" /* inittab file location */
#ifndef INIT_SCRIPT
#define INIT_SCRIPT "/etc/init.d/rcS" /* Default sysinit script. */
for(e = environment; *e; e++)
putenv((char *) *e);
}
+
+ if (argc > 1) setenv("RUNLEVEL", argv[1], 1);
+
/* Hello world */
message(MAYBE_CONSOLE | LOG, "init started: %s", bb_msg_full_version);