diff options
author | Ron Yorston <rmy@pobox.com> | 2019-03-31 08:55:48 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-03-31 09:51:00 +0100 |
commit | 61e0e3160a8be3ed8488b09200a5dca1bd1b21b4 (patch) | |
tree | d55341d875d1dd0d77445960723a47418efd14e5 /networking | |
parent | be2949717934c19890879cf2a8fc74c5da55d1c7 (diff) | |
parent | 35082fc2c17369223669e099f422acc0982ee4ff (diff) | |
download | busybox-w32-61e0e3160a8be3ed8488b09200a5dca1bd1b21b4.tar.gz busybox-w32-61e0e3160a8be3ed8488b09200a5dca1bd1b21b4.tar.bz2 busybox-w32-61e0e3160a8be3ed8488b09200a5dca1bd1b21b4.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'networking')
-rw-r--r-- | networking/inetd.c | 4 | ||||
-rw-r--r-- | networking/libiproute/ipaddress.c | 4 | ||||
-rw-r--r-- | networking/ntpd.c | 8 |
3 files changed, 9 insertions, 7 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index 8f871ee12..da6551174 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -1207,7 +1207,7 @@ static void clean_up_and_exit(int sig UNUSED_PARAM) | |||
1207 | if (ENABLE_FEATURE_CLEAN_UP) | 1207 | if (ENABLE_FEATURE_CLEAN_UP) |
1208 | close(sep->se_fd); | 1208 | close(sep->se_fd); |
1209 | } | 1209 | } |
1210 | remove_pidfile(CONFIG_PID_FILE_PATH "/inetd.pid"); | 1210 | remove_pidfile_std_path_and_ext("inetd"); |
1211 | exit(EXIT_SUCCESS); | 1211 | exit(EXIT_SUCCESS); |
1212 | } | 1212 | } |
1213 | 1213 | ||
@@ -1256,7 +1256,7 @@ int inetd_main(int argc UNUSED_PARAM, char **argv) | |||
1256 | setgroups(1, &gid); | 1256 | setgroups(1, &gid); |
1257 | } | 1257 | } |
1258 | 1258 | ||
1259 | write_pidfile(CONFIG_PID_FILE_PATH "/inetd.pid"); | 1259 | write_pidfile_std_path_and_ext("inetd"); |
1260 | 1260 | ||
1261 | /* never fails under Linux (except if you pass it bad arguments) */ | 1261 | /* never fails under Linux (except if you pass it bad arguments) */ |
1262 | getrlimit(RLIMIT_NOFILE, &rlim_ofile); | 1262 | getrlimit(RLIMIT_NOFILE, &rlim_ofile); |
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index d088caf4c..0a1b5d798 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -574,8 +574,8 @@ int FAST_FUNC ipaddr_list_or_flush(char **argv, int flush) | |||
574 | } | 574 | } |
575 | 575 | ||
576 | for (l = linfo; l; l = l->next) { | 576 | for (l = linfo; l; l = l->next) { |
577 | if (no_link | 577 | if ((oneline && G_filter.family != AF_PACKET) |
578 | || (oneline || print_linkinfo(&l->h) == 0) | 578 | || (print_linkinfo(&l->h) == 0) |
579 | /* ^^^^^^^^^ "ip -oneline a" does not print link info */ | 579 | /* ^^^^^^^^^ "ip -oneline a" does not print link info */ |
580 | ) { | 580 | ) { |
581 | struct ifinfomsg *ifi = NLMSG_DATA(&l->h); | 581 | struct ifinfomsg *ifi = NLMSG_DATA(&l->h); |
diff --git a/networking/ntpd.c b/networking/ntpd.c index 0f474bc09..027cfe783 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -2585,6 +2585,10 @@ static NOINLINE void ntp_init(char **argv) | |||
2585 | /* -l but no peers: "stratum 1 server" mode */ | 2585 | /* -l but no peers: "stratum 1 server" mode */ |
2586 | G.stratum = 1; | 2586 | G.stratum = 1; |
2587 | } | 2587 | } |
2588 | |||
2589 | if (!(opts & OPT_n)) /* only if backgrounded: */ | ||
2590 | write_pidfile_std_path_and_ext("ntpd"); | ||
2591 | |||
2588 | /* If network is up, syncronization occurs in ~10 seconds. | 2592 | /* If network is up, syncronization occurs in ~10 seconds. |
2589 | * We give "ntpd -q" 10 seconds to get first reply, | 2593 | * We give "ntpd -q" 10 seconds to get first reply, |
2590 | * then another 50 seconds to finish syncing. | 2594 | * then another 50 seconds to finish syncing. |
@@ -2641,8 +2645,6 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv) | |||
2641 | */ | 2645 | */ |
2642 | cnt = G.peer_cnt * (INITIAL_SAMPLES + 1); | 2646 | cnt = G.peer_cnt * (INITIAL_SAMPLES + 1); |
2643 | 2647 | ||
2644 | write_pidfile(CONFIG_PID_FILE_PATH "/ntpd.pid"); | ||
2645 | |||
2646 | while (!bb_got_signal) { | 2648 | while (!bb_got_signal) { |
2647 | llist_t *item; | 2649 | llist_t *item; |
2648 | unsigned i, j; | 2650 | unsigned i, j; |
@@ -2814,7 +2816,7 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv) | |||
2814 | } | 2816 | } |
2815 | } /* while (!bb_got_signal) */ | 2817 | } /* while (!bb_got_signal) */ |
2816 | 2818 | ||
2817 | remove_pidfile(CONFIG_PID_FILE_PATH "/ntpd.pid"); | 2819 | remove_pidfile_std_path_and_ext("ntpd"); |
2818 | kill_myself_with_sig(bb_got_signal); | 2820 | kill_myself_with_sig(bb_got_signal); |
2819 | } | 2821 | } |
2820 | 2822 | ||