diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-26 01:08:51 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-26 01:08:51 +0000 |
commit | 71c165780ac83b0562a7cbc3b57e87807f02055b (patch) | |
tree | ac33a1f5952103df64846103301c672e32b38606 /include | |
parent | 5bf59c104af94e918ce879352f27b40099bf51be (diff) | |
download | busybox-w32-71c165780ac83b0562a7cbc3b57e87807f02055b.tar.gz busybox-w32-71c165780ac83b0562a7cbc3b57e87807f02055b.tar.bz2 busybox-w32-71c165780ac83b0562a7cbc3b57e87807f02055b.zip |
ifplugd: new applet by Maksym Kryzhanovskyy (xmaks AT email.cz)
+3k code and 0.5k in messages. Most of the bloat due to compat :(
Diffstat (limited to 'include')
-rw-r--r-- | include/applets.h | 1 | ||||
-rw-r--r-- | include/usage.h | 57 |
2 files changed, 42 insertions, 16 deletions
diff --git a/include/applets.h b/include/applets.h index 820aaffe2..a41f75e31 100644 --- a/include/applets.h +++ b/include/applets.h | |||
@@ -189,6 +189,7 @@ IF_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | |||
189 | IF_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER)) | 189 | IF_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
190 | IF_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown)) | 190 | IF_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown)) |
191 | IF_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_NEVER)) | 191 | IF_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
192 | IF_IFPLUGD(APPLET(ifplugd, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | ||
192 | IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup)) | 193 | IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup)) |
193 | IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) | 194 | IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
194 | IF_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER)) | 195 | IF_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
diff --git a/include/usage.h b/include/usage.h index 7b88a2acc..3fb996126 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -1727,21 +1727,46 @@ | |||
1727 | /* "\n -r, --receive-slave Create a receive-only slave" */ | 1727 | /* "\n -r, --receive-slave Create a receive-only slave" */ |
1728 | 1728 | ||
1729 | #define ifenslave_example_usage \ | 1729 | #define ifenslave_example_usage \ |
1730 | "To create a bond device, simply follow these three steps :\n" \ | 1730 | "To create a bond device, simply follow these three steps:\n" \ |
1731 | "- ensure that the required drivers are properly loaded :\n" \ | 1731 | "- ensure that the required drivers are properly loaded:\n" \ |
1732 | " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \ | 1732 | " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \ |
1733 | "- assign an IP address to the bond device :\n" \ | 1733 | "- assign an IP address to the bond device:\n" \ |
1734 | " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \ | 1734 | " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \ |
1735 | "- attach all the interfaces you need to the bond device :\n" \ | 1735 | "- attach all the interfaces you need to the bond device:\n" \ |
1736 | " # ifenslave bond0 eth0 eth1 eth2\n" \ | 1736 | " # ifenslave bond0 eth0 eth1 eth2\n" \ |
1737 | " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \ | 1737 | " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \ |
1738 | " interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \ | 1738 | " interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \ |
1739 | " To detach a dead interface without setting the bond device down :\n" \ | 1739 | " To detach a dead interface without setting the bond device down:\n" \ |
1740 | " # ifenslave -d bond0 eth1\n\n" \ | 1740 | " # ifenslave -d bond0 eth1\n\n" \ |
1741 | " To set the bond device down and automatically release all the slaves :\n" \ | 1741 | " To set the bond device down and automatically release all the slaves:\n" \ |
1742 | " # ifconfig bond0 down\n\n" \ | 1742 | " # ifconfig bond0 down\n\n" \ |
1743 | " To change active slave :\n" \ | 1743 | " To change active slave:\n" \ |
1744 | " # ifenslave -c bond0 eth0\n" \ | 1744 | " # ifenslave -c bond0 eth0\n" \ |
1745 | |||
1746 | #define ifplugd_trivial_usage \ | ||
1747 | "[options]" | ||
1748 | #define ifplugd_full_usage "\n\n" \ | ||
1749 | "Network interface plug detection daemon.\n\n" \ | ||
1750 | "Options:\n" \ | ||
1751 | "\n -n Do not daemonize" \ | ||
1752 | "\n -s Do not log to syslog" \ | ||
1753 | "\n -i IFACE Interface" \ | ||
1754 | "\n -f/-F Treat link detection error as link down/link up" \ | ||
1755 | "\n (otherwise exit on error)" \ | ||
1756 | "\n -a Do not up interface automatically" \ | ||
1757 | "\n -M Monitor creation/destruction of interface" \ | ||
1758 | "\n (otherwise it must exist)" \ | ||
1759 | "\n -r PROG Script to run" \ | ||
1760 | "\n -x ARG Extra argument for script" \ | ||
1761 | "\n -I Don't exit on nonzero exit code from script" \ | ||
1762 | "\n -p Don't run script on daemon startup" \ | ||
1763 | "\n -q Don't run script on daemon quit" \ | ||
1764 | "\n -l Run script on startup even if no cable is detected" \ | ||
1765 | "\n -t SECS Poll time in seconds" \ | ||
1766 | "\n -u SECS Delay before running script after link up" \ | ||
1767 | "\n -d SECS Delay after link down" \ | ||
1768 | "\n -m MODE API mode (mii, priv, ethtool, wlan, auto)" \ | ||
1769 | "\n -k Kill running daemon" \ | ||
1745 | 1770 | ||
1746 | #define ifup_trivial_usage \ | 1771 | #define ifup_trivial_usage \ |
1747 | "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..." | 1772 | "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..." |
@@ -4346,17 +4371,17 @@ | |||
4346 | "CMD: {add|del|change|replace|show}\n" \ | 4371 | "CMD: {add|del|change|replace|show}\n" \ |
4347 | "\n" \ | 4372 | "\n" \ |
4348 | "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \ | 4373 | "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \ |
4349 | /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \ | 4374 | /* "[ estimator INTERVAL TIME_CONSTANT ]\n" */ \ |
4350 | "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ | 4375 | " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ |
4351 | "\tQDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \ | 4376 | " QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \ |
4352 | "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \ | 4377 | "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \ |
4353 | "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \ | 4378 | "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \ |
4354 | "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ | 4379 | " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ |
4355 | "class show [ dev STRING ] [ root | parent CLASSID ]\n" \ | 4380 | "class show [ dev STRING ] [ root | parent CLASSID ]\n" \ |
4356 | "filter [ pref PRIO ] [ protocol PROTO ]\n" \ | 4381 | "filter [ pref PRIO ] [ protocol PROTO ]\n" \ |
4357 | /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \ | 4382 | /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \ |
4358 | "\t[ root | classid CLASSID ] [ handle FILTERID ]\n" \ | 4383 | " [ root | classid CLASSID ] [ handle FILTERID ]\n" \ |
4359 | "\t[ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n" \ | 4384 | " [ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n" \ |
4360 | "filter show [ dev STRING ] [ root | parent CLASSID ]" | 4385 | "filter show [ dev STRING ] [ root | parent CLASSID ]" |
4361 | 4386 | ||
4362 | #define tcpsvd_trivial_usage \ | 4387 | #define tcpsvd_trivial_usage \ |