debian compatable ifup and ifdown commands
This commit is contained in:
parent
7ab93d9980
commit
021fa7db91
@ -239,6 +239,12 @@
|
||||
#ifdef CONFIG_IFCONFIG
|
||||
APPLET(ifconfig, ifconfig_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
|
||||
#endif
|
||||
#ifdef CONFIG_IFUPDOWN
|
||||
APPLET(ifdown, ifupdown_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
|
||||
#endif
|
||||
#ifdef CONFIG_IFUPDOWN
|
||||
APPLET(ifup, ifupdown_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
|
||||
#endif
|
||||
#ifdef CONFIG_INIT
|
||||
APPLET(init, init_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
|
||||
#endif
|
||||
|
@ -807,6 +807,34 @@
|
||||
USAGE_IFCONFIG_MII("\t[mem_start <NN>] [io_addr <NN>] [irq <NN>]\n") \
|
||||
"\t[up|down] ..."
|
||||
|
||||
#define ifup_trivial_usage \
|
||||
"<-ahinv> <ifaces...>"
|
||||
#define ifup_full_usage \
|
||||
"Usage: ifup <options> <ifaces...>\n\n" \
|
||||
"Options:\n" \
|
||||
"\t-h, --help\t\tthis help\n" \
|
||||
"\t-a, --all\t\tde/configure all interfaces automatically\n" \
|
||||
"\t-i, --interfaces FILE\tuse FILE for interface definitions\n" \
|
||||
"\t-n, --no-act\t\tprint out what would happen, but don't do it\n" \
|
||||
"\t\t\t\t(note that this option doesn't disable mappings)\n" \
|
||||
"\t-v, --verbose\t\tprint out what would happen before doing it\n" \
|
||||
"\t--no-mappings\t\tdon't run any mappings\n" \
|
||||
"\t--force\t\t\tforce de/configuration\n"
|
||||
|
||||
#define ifdown_trivial_usage \
|
||||
"<-ahinv> <ifaces...>"
|
||||
#define ifdown_full_usage \
|
||||
"Usage: ifdown <options> <ifaces...>\n\n" \
|
||||
"Options:\n" \
|
||||
"\t-h, --help\t\tthis help\n" \
|
||||
"\t-a, --all\t\tde/configure all interfaces automatically\n" \
|
||||
"\t-i, --interfaces FILE\tuse FILE for interface definitions\n" \
|
||||
"\t-n, --no-act\t\tprint out what would happen, but don't do it\n" \
|
||||
"\t\t\t\t(note that this option doesn't disable mappings)\n" \
|
||||
"\t-v, --verbose\t\tprint out what would happen before doing it\n" \
|
||||
"\t--no-mappings\t\tdon't run any mappings\n" \
|
||||
"\t--force\t\t\tforce de/configuration\n"
|
||||
|
||||
#define init_trivial_usage \
|
||||
""
|
||||
#define init_full_usage \
|
||||
|
@ -25,6 +25,7 @@ endif
|
||||
NETWORKING-y:=
|
||||
NETWORKING-$(CONFIG_HOSTNAME) += hostname.o
|
||||
NETWORKING-$(CONFIG_IFCONFIG) += ifconfig.o
|
||||
NETWORKING-$(CONFIG_IFUPDOWN) += ifupdown.o
|
||||
NETWORKING-$(CONFIG_NC) += nc.o
|
||||
NETWORKING-$(CONFIG_NETSTAT) += netstat.o
|
||||
NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
|
||||
|
@ -16,6 +16,12 @@ if [ "$CONFIG_IFCONFIG" = "y" ]; then
|
||||
bool ' Enable option "hw" (ether only)' CONFIG_FEATURE_IFCONFIG_HW
|
||||
bool ' Set the broadcast automatically' CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
fi
|
||||
bool 'ifupdown' CONFIG_IFUPDOWN
|
||||
if [ "$CONFIG_IFUPDOWN" = "y" ]; then
|
||||
bool ' Enable support for IPv4' CONFIG_FEATURE_IFUPDOWN_IPV4
|
||||
bool ' Enable support for IPv6 (requires ip command)' CONFIG_FEATURE_IFUPDOWN_IPV6
|
||||
bool ' Enable support for IPX (requires ipx_interface command)' CONFIG_FEATURE_IFUPDOWN_IPX
|
||||
fi
|
||||
bool 'nc' CONFIG_NC
|
||||
bool 'netstat' CONFIG_NETSTAT
|
||||
bool 'nslookup' CONFIG_NSLOOKUP
|
||||
|
1437
networking/ifupdown.c
Normal file
1437
networking/ifupdown.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user