diff options
-rw-r--r-- | networking/ifplugd.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/networking/ifplugd.c b/networking/ifplugd.c index c4b6b9584..0b55bf4e5 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c | |||
@@ -28,6 +28,7 @@ | |||
28 | //usage: "\n -a Don't up interface at each link probe" | 28 | //usage: "\n -a Don't up interface at each link probe" |
29 | //usage: "\n -M Monitor creation/destruction of interface" | 29 | //usage: "\n -M Monitor creation/destruction of interface" |
30 | //usage: "\n (otherwise it must exist)" | 30 | //usage: "\n (otherwise it must exist)" |
31 | //usage: "\n -A Don't up newly appeared interface" | ||
31 | //usage: "\n -r PROG Script to run" | 32 | //usage: "\n -r PROG Script to run" |
32 | //usage: "\n -x ARG Extra argument for script" | 33 | //usage: "\n -x ARG Extra argument for script" |
33 | //usage: "\n -I Don't exit on nonzero exit code from script" | 34 | //usage: "\n -I Don't exit on nonzero exit code from script" |
@@ -94,7 +95,7 @@ Netlink code then can be just dropped (1k or more?) | |||
94 | #define IFPLUGD_ENV_CURRENT "IFPLUGD_CURRENT" | 95 | #define IFPLUGD_ENV_CURRENT "IFPLUGD_CURRENT" |
95 | 96 | ||
96 | enum { | 97 | enum { |
97 | FLAG_NO_AUTO = 1 << 0, // -a, Do not enable interface automatically | 98 | FLAG_NO_AUTO = 1 << 0, // -a, Don't up interface at each link probe |
98 | FLAG_NO_DAEMON = 1 << 1, // -n, Do not daemonize | 99 | FLAG_NO_DAEMON = 1 << 1, // -n, Do not daemonize |
99 | FLAG_NO_SYSLOG = 1 << 2, // -s, Do not use syslog, use stderr instead | 100 | FLAG_NO_SYSLOG = 1 << 2, // -s, Do not use syslog, use stderr instead |
100 | FLAG_IGNORE_FAIL = 1 << 3, // -f, Ignore detection failure, retry instead (failure is treated as DOWN) | 101 | FLAG_IGNORE_FAIL = 1 << 3, // -f, Ignore detection failure, retry instead (failure is treated as DOWN) |
@@ -111,14 +112,15 @@ enum { | |||
111 | FLAG_INITIAL_DOWN = 1 << 14, // -l, Run "down" script on startup if no cable is detected | 112 | FLAG_INITIAL_DOWN = 1 << 14, // -l, Run "down" script on startup if no cable is detected |
112 | FLAG_EXTRA_ARG = 1 << 15, // -x, Specify an extra argument for action script | 113 | FLAG_EXTRA_ARG = 1 << 15, // -x, Specify an extra argument for action script |
113 | FLAG_MONITOR = 1 << 16, // -M, Use interface monitoring | 114 | FLAG_MONITOR = 1 << 16, // -M, Use interface monitoring |
115 | FLAG_NO_UP_NEW_IFACE = 1 << 17, // -A, Don't up newly appeared interface | ||
114 | #if ENABLE_FEATURE_PIDFILE | 116 | #if ENABLE_FEATURE_PIDFILE |
115 | FLAG_KILL = 1 << 17, // -k, Kill a running daemon | 117 | FLAG_KILL = 1 << 18, // -k, Kill a running daemon |
116 | #endif | 118 | #endif |
117 | }; | 119 | }; |
118 | #if ENABLE_FEATURE_PIDFILE | 120 | #if ENABLE_FEATURE_PIDFILE |
119 | # define OPTION_STR "+ansfFi:r:It:+u:+d:+m:pqlx:Mk" | 121 | # define OPTION_STR "+ansfFi:r:It:+u:+d:+m:pqlx:MAk" |
120 | #else | 122 | #else |
121 | # define OPTION_STR "+ansfFi:r:It:+u:+d:+m:pqlx:M" | 123 | # define OPTION_STR "+ansfFi:r:It:+u:+d:+m:pqlx:MA" |
122 | #endif | 124 | #endif |
123 | 125 | ||
124 | enum { // interface status | 126 | enum { // interface status |
@@ -387,7 +389,7 @@ static void up_iface(void) | |||
387 | 389 | ||
388 | static void maybe_up_new_iface(void) | 390 | static void maybe_up_new_iface(void) |
389 | { | 391 | { |
390 | if (!(option_mask32 & FLAG_NO_AUTO)) | 392 | if (!(option_mask32 & FLAG_NO_UP_NEW_IFACE)) |
391 | up_iface(); | 393 | up_iface(); |
392 | 394 | ||
393 | #if 0 /* bloat */ | 395 | #if 0 /* bloat */ |