[20387] | 1 | |
---|
| 2 | ifplugd 0.23 |
---|
| 3 | |
---|
| 4 | Copyright 2002-2004 Lennart Poettering <mzvscyhtq (at) 0pointer (dot) |
---|
| 5 | de> |
---|
| 6 | * [1]License |
---|
| 7 | * [2]News |
---|
| 8 | * [3]Overview |
---|
| 9 | * [4]Status |
---|
| 10 | * [5]Documentation |
---|
| 11 | * [6]Requirements |
---|
| 12 | * [7]Installation |
---|
| 13 | * [8]Acknowledgements |
---|
| 14 | * [9]Download |
---|
| 15 | |
---|
| 16 | License |
---|
| 17 | |
---|
| 18 | This program is free software; you can redistribute it and/or modify |
---|
| 19 | it under the terms of the GNU General Public License as published by |
---|
| 20 | the Free Software Foundation; either version 2 of the License, or (at |
---|
| 21 | your option) any later version. |
---|
| 22 | |
---|
| 23 | This program is distributed in the hope that it will be useful, but |
---|
| 24 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 26 | General Public License for more details. |
---|
| 27 | |
---|
| 28 | You should have received a copy of the GNU General Public License |
---|
| 29 | along with this program; if not, write to the Free Software |
---|
| 30 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
| 31 | |
---|
| 32 | News |
---|
| 33 | |
---|
| 34 | Wed Apr 7 2004: |
---|
| 35 | |
---|
| 36 | [10]Version 0.23 released, changes include: don't make /dev/tty1 the |
---|
| 37 | controlling TTY when beeping |
---|
| 38 | |
---|
| 39 | Tue Feb 10 2004: |
---|
| 40 | |
---|
| 41 | [11]Version 0.22 released, changes include: rename ifstatus to |
---|
| 42 | ifplugstatus due to namespace collision, minor fixes |
---|
| 43 | |
---|
| 44 | Mon Jan 26 2004: |
---|
| 45 | |
---|
| 46 | [12]Version 0.21b released, added missing file. |
---|
| 47 | |
---|
| 48 | Mon Jan 26 2004: |
---|
| 49 | |
---|
| 50 | [13]Version 0.21 released, changes include: better compatibility with |
---|
| 51 | wireless devices, compatibility with newer kernels |
---|
| 52 | |
---|
| 53 | Sun Nov 9 2003: |
---|
| 54 | |
---|
| 55 | [14]Version 0.20 released, changes include: fix wrong message, build |
---|
| 56 | fix |
---|
| 57 | |
---|
| 58 | Mon Oct 20 2003: |
---|
| 59 | |
---|
| 60 | [15]Version 0.19 released, changes include: New option |
---|
| 61 | --wait-for-kill, this requires [16]libdaemon 0.3 |
---|
| 62 | |
---|
| 63 | Fri Oct 17 2003: |
---|
| 64 | |
---|
| 65 | [17]Version 0.18 released, changes include: Some bugs fixed |
---|
| 66 | |
---|
| 67 | Fri Sep 13 2003: |
---|
| 68 | |
---|
| 69 | [18]Version 0.17b released, changes include: typo and date fix |
---|
| 70 | |
---|
| 71 | Fri Sep 13 2003: |
---|
| 72 | |
---|
| 73 | [19]Version 0.17 released, changes include: documentation update, |
---|
| 74 | better support for multiple interfaces, gcc 2.95 build fix |
---|
| 75 | |
---|
| 76 | Thu Aug 13 2003: |
---|
| 77 | |
---|
| 78 | [20]Version 0.16 released, changes include: RPM spec file added, build |
---|
| 79 | fixes, WLAN improvements (including compatibility with the upcoming |
---|
| 80 | waproamd, a WLAN roaming daemon), monitor mode for use in conjunction |
---|
| 81 | with PCMCIA devices, better support for multiple interface setups, |
---|
| 82 | SUPPORTED_DRIVERS returns |
---|
| 83 | |
---|
| 84 | Thu July 10 2003: |
---|
| 85 | |
---|
| 86 | [21]Version 0.15 released, changes include: bad umask fix, |
---|
| 87 | documentation update |
---|
| 88 | |
---|
| 89 | Mon July 7 2003: |
---|
| 90 | |
---|
| 91 | [22]Version 0.14 released, changes include: autoconf usage, new |
---|
| 92 | dependency [23]libdaemon, wireless LAN support, support for |
---|
| 93 | suspending/resuming, many fixes |
---|
| 94 | |
---|
| 95 | Overview |
---|
| 96 | |
---|
| 97 | ifplugd is a Linux daemon which will automatically configure your |
---|
| 98 | ethernet device when a cable is plugged in and automatically |
---|
| 99 | unconfigure it if the cable is pulled. This is useful on laptops with |
---|
| 100 | onboard network adapters, since it will only configure the interface |
---|
| 101 | when a cable is really connected. |
---|
| 102 | |
---|
| 103 | ifplugd ifplugd interfaces with your distribution's native network |
---|
| 104 | configuration utilities. |
---|
| 105 | |
---|
| 106 | Some features: |
---|
| 107 | * Uses your distribution's native ifup/ifdown programs. |
---|
| 108 | * May beep when the cable is unplugged, plugged, the interface |
---|
| 109 | configuration succeeded or failed. |
---|
| 110 | * Supports the Linux SIOCETHTOOL (newer, aka ethtool API), |
---|
| 111 | SIOCGMIIREG (older, aka mii-diag/mii-tool API) and SIOCDEVPRIVATE |
---|
| 112 | (oldest, aka mii-tool API) ioctl()s for getting link status. |
---|
| 113 | * Syslog support |
---|
| 114 | * Small program - the binary is just 19 KB (plus 11 KB for |
---|
| 115 | libdaemon). |
---|
| 116 | * Multiple ethernet interface support |
---|
| 117 | * Can be configured to ignore short "unplugged" periods (-d option) |
---|
| 118 | or short "plugged" periods(-u option) |
---|
| 119 | * Support for wireless networking. Whenever an association to an AP |
---|
| 120 | is detected the network is configured. Have a look on [24]waproamd |
---|
| 121 | if you need a facility to configure WEP keys before AP |
---|
| 122 | associations succeed. |
---|
| 123 | * Compatibility mode for network devices which do not support cable |
---|
| 124 | detection (-F option) |
---|
| 125 | |
---|
| 126 | Status |
---|
| 127 | |
---|
| 128 | Version 0.23 is stable and has all the sensible features its users |
---|
| 129 | could think of. |
---|
| 130 | |
---|
| 131 | Documentation |
---|
| 132 | |
---|
| 133 | Have a look on the man pages [25]ifplugd(8), [26]ifplugstatus(8), |
---|
| 134 | [27]ifplugd.conf(5). (An XSLT capable browser is required) |
---|
| 135 | |
---|
| 136 | Configuration |
---|
| 137 | |
---|
| 138 | Edit /etc/ifplugd/ifplugd.conf for configuration changes. This file is |
---|
| 139 | a bourne shell script sourced by the init script and used to start |
---|
| 140 | ifplugd with appropriate arguments. You may specify more than one |
---|
| 141 | ethernet interface in INTERFACES. For each interface a seperate |
---|
| 142 | instance of ifplugd is spawned. The arguments specified in ARGS are |
---|
| 143 | append to ifplugd's command line. Have a look on ifplugd -h or man |
---|
| 144 | ifplugd for further information about the available options. |
---|
| 145 | |
---|
| 146 | The network interface which is controlled by ifplugd should not be |
---|
| 147 | configured automatically by your distribution's network subsystem, |
---|
| 148 | since ifplugd will do this for you if needed. |
---|
| 149 | |
---|
| 150 | On Debian systems, any interfaces named in ifplugd's INTERFACES |
---|
| 151 | environment variable should not also be listed in an "auto" stanza in |
---|
| 152 | /etc/network/interfaces. |
---|
| 153 | |
---|
| 154 | Troubleshooting |
---|
| 155 | |
---|
| 156 | When you are using the hotplug subsystem (Debian package hotplug) you |
---|
| 157 | may notice that the network device is configured even when it is not |
---|
| 158 | listed on an auto line in /etc/network/interface. This may be due to |
---|
| 159 | hotplug being configured to ifup the network interface when it becomes |
---|
| 160 | available. This was the default behavior in the Debian hotplug package |
---|
| 161 | prior to release 0.0.20030117-1, for example. To prevent this you |
---|
| 162 | should either upgrade your hotplug package or comment out the ifup |
---|
| 163 | call in /etc/hotplug/net.agent. |
---|
| 164 | |
---|
| 165 | When using ifplugd together with APM (and probably ACPI) suspends, |
---|
| 166 | strange things may happen: some network devices fail to detect the |
---|
| 167 | network cable for a short period of time before and after the suspend. |
---|
| 168 | When using the -f switch, this will be treated as "no link beat", thus |
---|
| 169 | the network is shutdown after a timeout. During this timeout the |
---|
| 170 | machine changes to suspended state. When it is resumed again, the |
---|
| 171 | timeout period will have expired and so the network is deconfigured, |
---|
| 172 | however, as the next cable detection succeeds, the network is |
---|
| 173 | configured again immediately. To fix this problem, ifplugd should be |
---|
| 174 | disabled before the APM suspend and enabled back after the suspend. |
---|
| 175 | This may be done by using apmd and adding a script to |
---|
| 176 | /etc/apm/{suspend,resume}.d which simply calls /etc/init.d/ifplugd |
---|
| 177 | suspend, resp. /etc/init.d/ifplugd resume. It might even be a good |
---|
| 178 | idea to shut down the network completely during suspend, this may be |
---|
| 179 | achieved by calling /etc/init.d/ifplugd stop and /etc/init.d/ifplugd |
---|
| 180 | start in the appropriate places. I strongly urge the packagers of this |
---|
| 181 | software for the Linux distributions to add such scripts to their |
---|
| 182 | packages. |
---|
| 183 | |
---|
| 184 | FAQ |
---|
| 185 | |
---|
| 186 | 1. Q: I want to use ifplugd with my PCMCIA device, but ifplugd quits |
---|
| 187 | when it doesn't find eth0, when I have not inserted the card. What |
---|
| 188 | can I do? |
---|
| 189 | A: Use the -f switch. This is not very clean however, since |
---|
| 190 | modprobe is called on each cable detection query of ifplugd to |
---|
| 191 | load a module for the network device. This is suboptimal. You |
---|
| 192 | should probably run ifplugd only when the card is really inserted. |
---|
| 193 | 2. Q: I am using the -f switch, but the kernel logs are getting |
---|
| 194 | filled with messages like "modprobe: modprobe: Can't locate module |
---|
| 195 | eth0". What can I do? |
---|
| 196 | A: Make sure you have a line like alias eth0 off in your |
---|
| 197 | /etc/modules.conf |
---|
| 198 | 3. Q: When the cable is unplugged and the interface shut down it is |
---|
| 199 | still available with ifconfig and markes as UP. Why this? |
---|
| 200 | A: ifplugd cannot detect the link beat with a shut down interface |
---|
| 201 | on certain (most as of kernel 2.4.19) network drivers. Thus |
---|
| 202 | ifplugd enables the interface before querying the link status. |
---|
| 203 | This may be switched off with -a flag. You might want to use it if |
---|
| 204 | you have a sane network driver (e.g. eepro100). The subdirectory |
---|
| 205 | patches/ in the ifplugd distribution includes a patch for the |
---|
| 206 | 8139too 0.9.26 driver, which makes the driver compatible with -a. |
---|
| 207 | Don't ask me how to apply this patch. If you don't know, you won't |
---|
| 208 | need it. |
---|
| 209 | 4. Q: Does it work with anything else than plain ethernet or wireless |
---|
| 210 | LAN? |
---|
| 211 | A: Certainly not, since the MII and ETHTOOL ioctl()s and the |
---|
| 212 | wireless extension don't exist on other network device types. |
---|
| 213 | 5. Q: I have a Realtek 8139 based network card. Everytime ifplugd |
---|
| 214 | starts on bootup my machine freezes. What can I do? |
---|
| 215 | A: This is a bug in the 8139too driver 0.9.25 (at least) shipped |
---|
| 216 | with Linux 2.4.19, please upgrade to 8139too 0.9.26 (Linux 2.4.20 |
---|
| 217 | or seperately at |
---|
| 218 | [28]http://www.sourceforge.net/projects/gkernel/). |
---|
| 219 | 6. Q: There are already laptop-net's ifd and miid, why did you write |
---|
| 220 | your own daemon? |
---|
| 221 | A: laptop-net was too integrated with its profile system and |
---|
| 222 | didn't work on my hardware when I had a look on it. It seemed |
---|
| 223 | easier to me to write a simple but feature complete replacement |
---|
| 224 | than using laptop-net without most of the special features |
---|
| 225 | disabled. I didn't know about miid when I wrote ifplugd, but in |
---|
| 226 | any case ifplugd is much better than miid. For a comparison of |
---|
| 227 | miid and ifplugd, have a look on |
---|
| 228 | [29]http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=162763&repeat |
---|
| 229 | merged=yes |
---|
| 230 | |
---|
| 231 | Requirements |
---|
| 232 | |
---|
| 233 | A newer Linux Kernel (I think 2.2 is good enough, alltough I tested it |
---|
| 234 | only with 2.4) with a compatible device driver and ethernet card. Most |
---|
| 235 | modern cards and drivers are compatible, like mine which works with |
---|
| 236 | the 8139too driver. |
---|
| 237 | |
---|
| 238 | ifplugd was developed and tested on Debian GNU/Linux "testing" from |
---|
| 239 | July 2003, it should work on most other Linux distributions (and maybe |
---|
| 240 | Unix versions) since it uses GNU autoconf and GNU libtool for source |
---|
| 241 | code configuration and shared library management. |
---|
| 242 | |
---|
| 243 | The machine used was a Medion 9580-F laptop with a Realtek 8139 |
---|
| 244 | network card and a PRISM1 PCMCIA wireless LAN card. |
---|
| 245 | |
---|
| 246 | ifplugd needs [30]libdaemon. |
---|
| 247 | |
---|
| 248 | Installation |
---|
| 249 | |
---|
| 250 | As this package is made with the GNU autotools you should run |
---|
| 251 | ./configure inside the distribution directory for configuring the |
---|
| 252 | source tree. After that you should run make for compilation and make |
---|
| 253 | install (as root) for installation of ifplugd. |
---|
| 254 | |
---|
| 255 | The installation scripts create an init script in |
---|
| 256 | ${sysconfdir}/init.d/ifplugd, however no /etc/rc?.d/ links are created |
---|
| 257 | for it. |
---|
| 258 | |
---|
| 259 | Extensive installation instructions for ifplugd are available at |
---|
| 260 | [31]Geoff Ericksson's web site. |
---|
| 261 | |
---|
| 262 | Acknowledgements |
---|
| 263 | |
---|
| 264 | For the developers of mii-diag, ethtool and laptop-net, since I looked |
---|
| 265 | on their source codes for learning how to use the link beat ioctls. |
---|
| 266 | |
---|
| 267 | Oliver Kurth for packaging ifplugd for Debian and ifplugd's manpage |
---|
| 268 | |
---|
| 269 | Thomas Hood, Asgeir Nilsen, Sean Reifschneider, R. Steve McKown, David |
---|
| 270 | Mitchell, Norbert Preining, Herbert Graeber for patches |
---|
| 271 | |
---|
| 272 | Frederic Lepied for integrating ifplugd into Mandrake Linux |
---|
| 273 | |
---|
| 274 | Download |
---|
| 275 | |
---|
| 276 | The newest release is always available from |
---|
| 277 | [32]http://0pointer.de/lennart/projects/ifplugd/ |
---|
| 278 | |
---|
| 279 | The current release is [33]0.23 |
---|
| 280 | |
---|
| 281 | Get ifplugd's development sources from the [34]Subversion |
---|
| 282 | [35]repository. |
---|
| 283 | |
---|
| 284 | You may find an up to date Debian package of ifplugd on the [36]Debian |
---|
| 285 | package repository. |
---|
| 286 | |
---|
| 287 | Packages for Mandrake Linux may be found in the Cooker distribution; |
---|
| 288 | Gentoo packages are available as well; [37]SuSE packages are available |
---|
| 289 | courtesy of Herbert Graeber. |
---|
| 290 | |
---|
| 291 | If you want to be notified whenever I release a new version of this |
---|
| 292 | software use the subscription feature of [38]Freshmeat. |
---|
| 293 | |
---|
| 294 | New! There is a joint ifplugd and waproamd [39]mailing list available. |
---|
| 295 | _________________________________________________________________ |
---|
| 296 | |
---|
| 297 | |
---|
| 298 | Lennart Poettering <mzvscyhtq (at) 0pointer (dot) de>, April 2004 |
---|
| 299 | |
---|
| 300 | $Id: README,v 1.1.1.1 2004-04-09 20:09:25 amb Exp $ |
---|
| 301 | |
---|
| 302 | References |
---|
| 303 | |
---|
| 304 | 1. README#license |
---|
| 305 | 2. README#news |
---|
| 306 | 3. README#overview |
---|
| 307 | 4. README#status |
---|
| 308 | 5. README#documentation |
---|
| 309 | 6. README#requirements |
---|
| 310 | 7. README#installation |
---|
| 311 | 8. README#acks |
---|
| 312 | 9. README#download |
---|
| 313 | 10. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.23.tar.gz |
---|
| 314 | 11. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.22.tar.gz |
---|
| 315 | 12. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.21b.tar.gz |
---|
| 316 | 13. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.21.tar.gz |
---|
| 317 | 14. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.20.tar.gz |
---|
| 318 | 15. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.19.tar.gz |
---|
| 319 | 16. http://0pointer.de/lennart/projects/libdaemon/ |
---|
| 320 | 17. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.18.tar.gz |
---|
| 321 | 18. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.17b.tar.gz |
---|
| 322 | 19. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.17.tar.gz |
---|
| 323 | 20. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.16.tar.gz |
---|
| 324 | 21. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.15.tar.gz |
---|
| 325 | 22. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.14.tar.gz |
---|
| 326 | 23. http://0pointer.de/lennart/projects/libdaemon/ |
---|
| 327 | 24. http://0pointer.de/lennart/projects/waproamd/ |
---|
| 328 | 25. http://0pointer.de/lennart/projects/ifplugd/ifplugd.8.xml |
---|
| 329 | 26. http://0pointer.de/lennart/projects/ifplugd/ifplugstatus.8.xml |
---|
| 330 | 27. http://0pointer.de/lennart/projects/ifplugd/ifplugd.conf.5.xml |
---|
| 331 | 28. http://www.sourceforge.net/projects/gkernel/ |
---|
| 332 | 29. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=162763&repeatmerged=yes |
---|
| 333 | 30. http://0pointer.de/lennart/projects/libdaemon/ |
---|
| 334 | 31. http://www.acmc.uq.edu.au/~gbe/linux/installation_of_ifplugd.html |
---|
| 335 | 32. http://0pointer.de/lennart/projects/ifplugd/ |
---|
| 336 | 33. http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.23.tar.gz |
---|
| 337 | 34. http://subversion.tigris.org/ |
---|
| 338 | 35. https://seth.intheinter.net:8081/svn/ifplugd/ |
---|
| 339 | 36. http://packages.debian.org/ifplugd |
---|
| 340 | 37. http://packman.links2linux.de/ |
---|
| 341 | 38. http://freshmeat.net/projects/ifplugd/ |
---|
| 342 | 39. https://seth.intheinter.net/mailman/listinfo/ifplugd-discuss |
---|