diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-27 02:35:15 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-27 02:35:15 +0100 |
commit | 160b9ca7318fb63e9432c1028f52373aea6166f9 (patch) | |
tree | 9332d87a07380d9df65858e4d3779b5130ed02f3 | |
parent | 1361aa2e2d80cb144b4158722de3c913855e6002 (diff) | |
download | busybox-w32-160b9ca7318fb63e9432c1028f52373aea6166f9.tar.gz busybox-w32-160b9ca7318fb63e9432c1028f52373aea6166f9.tar.bz2 busybox-w32-160b9ca7318fb63e9432c1028f52373aea6166f9.zip |
ntpd: make it NOMMU-safe; ash: exclude it on NOMMU builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/ntpd.c | 16 | ||||
-rw-r--r-- | shell/Config.in | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index 156cad6cf..c374120e2 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -892,6 +892,14 @@ static NOINLINE void ntp_init(char **argv) | |||
892 | &peers, &G.verbose); | 892 | &peers, &G.verbose); |
893 | if (!(opts & (OPT_p|OPT_l))) | 893 | if (!(opts & (OPT_p|OPT_l))) |
894 | bb_show_usage(); | 894 | bb_show_usage(); |
895 | if (opts & OPT_g) | ||
896 | G.settime = 1; | ||
897 | while (peers) | ||
898 | add_peers(llist_pop(&peers)); | ||
899 | if (!(opts & OPT_n)) { | ||
900 | bb_daemonize_or_rexec(DAEMON_DEVNULL_STDIO, argv); | ||
901 | logmode = LOGMODE_NONE; | ||
902 | } | ||
895 | #if ENABLE_FEATURE_NTPD_SERVER | 903 | #if ENABLE_FEATURE_NTPD_SERVER |
896 | G.listen_fd = -1; | 904 | G.listen_fd = -1; |
897 | if (opts & OPT_l) { | 905 | if (opts & OPT_l) { |
@@ -900,14 +908,6 @@ static NOINLINE void ntp_init(char **argv) | |||
900 | setsockopt(G.listen_fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY)); | 908 | setsockopt(G.listen_fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY)); |
901 | } | 909 | } |
902 | #endif | 910 | #endif |
903 | if (opts & OPT_g) | ||
904 | G.settime = 1; | ||
905 | while (peers) | ||
906 | add_peers(llist_pop(&peers)); | ||
907 | if (!(opts & OPT_n)) { | ||
908 | logmode = LOGMODE_NONE; | ||
909 | bb_daemonize(DAEMON_DEVNULL_STDIO); | ||
910 | } | ||
911 | /* I hesitate to set -20 prio. -15 should be high enough for timekeeping */ | 911 | /* I hesitate to set -20 prio. -15 should be high enough for timekeeping */ |
912 | if (opts & OPT_N) | 912 | if (opts & OPT_N) |
913 | setpriority(PRIO_PROCESS, 0, -15); | 913 | setpriority(PRIO_PROCESS, 0, -15); |
diff --git a/shell/Config.in b/shell/Config.in index 998672cfc..8a2654071 100644 --- a/shell/Config.in +++ b/shell/Config.in | |||
@@ -15,6 +15,7 @@ choice | |||
15 | config FEATURE_SH_IS_ASH | 15 | config FEATURE_SH_IS_ASH |
16 | select ASH | 16 | select ASH |
17 | bool "ash" | 17 | bool "ash" |
18 | depends on !NOMMU | ||
18 | 19 | ||
19 | config FEATURE_SH_IS_HUSH | 20 | config FEATURE_SH_IS_HUSH |
20 | select HUSH | 21 | select HUSH |
@@ -36,6 +37,7 @@ endchoice | |||
36 | config ASH | 37 | config ASH |
37 | bool "ash" | 38 | bool "ash" |
38 | default n | 39 | default n |
40 | depends on !NOMMU | ||
39 | help | 41 | help |
40 | Tha 'ash' shell adds about 60k in the default configuration and is | 42 | Tha 'ash' shell adds about 60k in the default configuration and is |
41 | the most complete and most pedantically correct shell included with | 43 | the most complete and most pedantically correct shell included with |