mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
ntpd: make it NOMMU-safe; ash: exclude it on NOMMU builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
1361aa2e2d
commit
160b9ca731
@ -892,6 +892,14 @@ static NOINLINE void ntp_init(char **argv)
|
|||||||
&peers, &G.verbose);
|
&peers, &G.verbose);
|
||||||
if (!(opts & (OPT_p|OPT_l)))
|
if (!(opts & (OPT_p|OPT_l)))
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
|
if (opts & OPT_g)
|
||||||
|
G.settime = 1;
|
||||||
|
while (peers)
|
||||||
|
add_peers(llist_pop(&peers));
|
||||||
|
if (!(opts & OPT_n)) {
|
||||||
|
bb_daemonize_or_rexec(DAEMON_DEVNULL_STDIO, argv);
|
||||||
|
logmode = LOGMODE_NONE;
|
||||||
|
}
|
||||||
#if ENABLE_FEATURE_NTPD_SERVER
|
#if ENABLE_FEATURE_NTPD_SERVER
|
||||||
G.listen_fd = -1;
|
G.listen_fd = -1;
|
||||||
if (opts & OPT_l) {
|
if (opts & OPT_l) {
|
||||||
@ -900,14 +908,6 @@ static NOINLINE void ntp_init(char **argv)
|
|||||||
setsockopt(G.listen_fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY));
|
setsockopt(G.listen_fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (opts & OPT_g)
|
|
||||||
G.settime = 1;
|
|
||||||
while (peers)
|
|
||||||
add_peers(llist_pop(&peers));
|
|
||||||
if (!(opts & OPT_n)) {
|
|
||||||
logmode = LOGMODE_NONE;
|
|
||||||
bb_daemonize(DAEMON_DEVNULL_STDIO);
|
|
||||||
}
|
|
||||||
/* I hesitate to set -20 prio. -15 should be high enough for timekeeping */
|
/* I hesitate to set -20 prio. -15 should be high enough for timekeeping */
|
||||||
if (opts & OPT_N)
|
if (opts & OPT_N)
|
||||||
setpriority(PRIO_PROCESS, 0, -15);
|
setpriority(PRIO_PROCESS, 0, -15);
|
||||||
|
@ -15,6 +15,7 @@ choice
|
|||||||
config FEATURE_SH_IS_ASH
|
config FEATURE_SH_IS_ASH
|
||||||
select ASH
|
select ASH
|
||||||
bool "ash"
|
bool "ash"
|
||||||
|
depends on !NOMMU
|
||||||
|
|
||||||
config FEATURE_SH_IS_HUSH
|
config FEATURE_SH_IS_HUSH
|
||||||
select HUSH
|
select HUSH
|
||||||
@ -36,6 +37,7 @@ endchoice
|
|||||||
config ASH
|
config ASH
|
||||||
bool "ash"
|
bool "ash"
|
||||||
default n
|
default n
|
||||||
|
depends on !NOMMU
|
||||||
help
|
help
|
||||||
Tha 'ash' shell adds about 60k in the default configuration and is
|
Tha 'ash' shell adds about 60k in the default configuration and is
|
||||||
the most complete and most pedantically correct shell included with
|
the most complete and most pedantically correct shell included with
|
||||||
|
Loading…
Reference in New Issue
Block a user