extern void print_login_issue(const char *issue_file, const char *tty);
extern void print_login_prompt(void);
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
extern void vfork_daemon_rexec(int nochdir, int noclose,
int argc, char **argv, char *foreground_opt);
#endif
#include "libbb.h"
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
void vfork_daemon_rexec(int nochdir, int noclose,
int argc, char **argv, char *foreground_opt)
{
exit(0);
}
}
-#endif /* uClinux */
+#endif /* BB_NOMMU */
*/
if (!(opt & 4)) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
/* reexec for vfork() do continue parent */
vfork_daemon_rexec(1, 0, ac, av, "-f");
-#else /* uClinux */
+#else
bb_xdaemon(1, 0);
-#endif /* uClinux */
+#endif
}
(void) startlogger(); /* need if syslog mode selected */
}
/*
- * Insert length of substrings insetad of dots
+ * Insert length of substrings instead of dots
*/
static void undot(uint8_t * rip)
{
}
if(is_daemon())
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
/* reexec for vfork() do continue parent */
vfork_daemon_rexec(1, 0, argc, argv, "-d");
-#else /* uClinux */
+#else
bb_xdaemon(1, 0);
-#endif /* uClinuvx */
+#endif
dnsentryinit(is_verbose());
bb_error_msg_and_die ("non-root must specify a config file");
if (!(opt & 2)) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
/* reexec for vfork() do continue parent */
vfork_daemon_rexec (0, 0, argc, argv, "-f");
#else
- daemon (0, 0); /* bb_xdaemon? */
-#endif /* uClinux */
+ bb_xdaemon (0, 0);
+#endif
} else {
setsid ();
}
}
if (!(opt & OPT_FOREGROUND)) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
vfork_daemon_rexec(0, 1, argc, argv, "-n");
-#else /* __uClinux__ */
+#else
bb_xdaemon(0, 1);
-#endif /* __uClinux__ */
+#endif
}
doKlogd(console_log_level);
umask(0);
if (doFork == TRUE) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
vfork_daemon_rexec(0, 1, argc, argv, "-n");
-#else /* __uClinux__ */
+#else
bb_xdaemon(0, 1);
-#endif /* __uClinux__ */
+#endif
}
doSyslogd();