From 217d61819a64e38384e632ca2f8b4daa0447d986 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 24 Mar 2004 22:21:34 +0000 Subject: documentation update git-svn-id: file:///home/lennart/svn/public/mod_mime_xattr/trunk@4 f01872de-66d6-0310-9185-fc3b30f50adc --- NOTICE | 2 +- doc/README.html.in | 291 ++++++++++++++++++----------------------------------- doc/style.css | 32 ++++++ 3 files changed, 130 insertions(+), 195 deletions(-) create mode 100644 doc/style.css diff --git a/NOTICE b/NOTICE index 9dffac5..8587606 100644 --- a/NOTICE +++ b/NOTICE @@ -1 +1 @@ -This software was developed by Lennart Poettering, 2004 +This software has been developed by Lennart Poettering diff --git a/doc/README.html.in b/doc/README.html.in index 7e97387..d35de67 100644 --- a/doc/README.html.in +++ b/doc/README.html.in @@ -3,14 +3,14 @@ -ifplugd @PACKAGE_VERSION@ +mod_mime_xattr @PACKAGE_VERSION@ -

ifplugd @PACKAGE_VERSION@

+

mod_mime_xattr @PACKAGE_VERSION@

-

Copyright 2002-2004 Lennart Poettering <@PACKAGE_BUGREPORT@>

+

Copyright 2004 Lennart Poettering <@PACKAGE_BUGREPORT@>

- -

Status

+

If used with symbolic links, mod_mime_xattr will first +check if an EA is set for the symlink itself, and second for the file +the link points to. The user.charset EA is only used when the +user.mime-type EA is set as well.

-

Version @PACKAGE_VERSION@ is stable and has all the sensible features its users could think of.

- -

Documentation

+

CGI and PHP scripts

-

Have a look on the man pages ifplugd(8), ifplugstatus(8), ifplugd.conf(5). (An XSLT capable browser is required)

+

You may use the user.apache-handler EA to mark a file as CGI script:

-

Configuration

+
setfattr -n "user.apache-handler" -v "cgi-script" foo.html
-

Edit /etc/ifplugd/ifplugd.conf for configuration -changes. This file is a bourne shell script sourced by the init script -and used to start ifplugd with appropriate arguments. You may specify more than -one ethernet interface in INTERFACES. For each interface a -seperate instance of ifplugd is spawned. The arguments specified in -ARGS are append to ifplugd's command line. Have a look on -ifplugd -h or man ifplugd for further information -about the available options.

- -

The network interface which is controlled by ifplugd -should not be configured automatically by your distribution's network -subsystem, since ifplugd will do this for you if needed.

- -

On Debian systems, any interfaces named in ifplugd's -INTERFACES environment variable should not also be listed in -an "auto" stanza in /etc/network/interfaces.

- -

Troubleshooting

- -

When you are using the hotplug subsystem (Debian package -hotplug) you may notice that the network device is configured -even when it is not listed on an auto line in -/etc/network/interface. This may be due to hotplug -being configured to ifup the network interface when it -becomes available. This was the default behavior in the Debian -hotplug package prior to release 0.0.20030117-1, for -example. To prevent this you should either upgrade your -hotplug package or comment out the ifup call in -/etc/hotplug/net.agent.

- -

When using ifplugd together with APM (and probably ACPI) -suspends, strange things may happen: some network devices fail to -detect the network cable for a short period of time before and after -the suspend. When using the -f switch, this will be treated -as "no link beat", thus the network is shutdown after a -timeout. During this timeout the machine changes to suspended -state. When it is resumed again, the timeout period will have expired -and so the network is deconfigured, however, as the next cable -detection succeeds, the network is configured again immediately. To -fix this problem, ifplugd should be disabled before the APM -suspend and enabled back after the suspend. This may be done by using -apmd and adding a script to -/etc/apm/{suspend,resume}.d which simply calls -/etc/init.d/ifplugd suspend, resp. /etc/init.d/ifplugd -resume. It might even be a good idea to shut down the network -completely during suspend, this may be achieved by calling -/etc/init.d/ifplugd stop and /etc/init.d/ifplugd -start in the appropriate places. I strongly urge the packagers of -this software for the Linux distributions to add such scripts to their -packages.

- -

FAQ

- -
    -
  1. Q: I want to use ifplugd with my PCMCIA device, but ifplugd quits - when it doesn't find eth0, when I have not inserted the - card. What can I do?

    - -

    A: Use the -f switch. This is not very clean however, - since modprobe is called on each cable detection query of ifplugd to - load a module for the network device. This is suboptimal. You should - probably run ifplugd only when the card is really inserted.

    -
  2. - -
  3. Q: I am using the -f switch, but the kernel logs are getting filled - with messages like "modprobe: modprobe: Can't locate module - eth0". What can I do?

    - -

    A: Make sure you have a line like alias eth0 off in your /etc/modules.conf

    -
  4. - -
  5. Q: When the cable is unplugged and the interface shut down it is - still available with ifconfig and markes as UP. Why this?

    - -

    A: ifplugd cannot detect the link beat with a shut down interface on - certain (most as of kernel 2.4.19) network drivers. Thus ifplugd - enables the interface before querying the link status. This may - be switched off with -a flag. You might want to use it if you - have a sane network driver (e.g. eepro100). The subdirectory - patches/ in the ifplugd distribution includes a patch for the - 8139too 0.9.26 driver, which makes the driver compatible with - -a. Don't ask me how to apply this patch. If you don't know, you - won't need it.

  6. - -
  7. Q: Does it work with anything else than plain ethernet or wireless LAN?

    - -

    A: Certainly not, since the MII and -ETHTOOL ioctl()s and the wireless extension don't -exist on - other network device types.

  8. - -
  9. Q: I have a Realtek 8139 based network card. Everytime ifplugd - starts on bootup my machine freezes. What can I do?

    - -

    A: This is a bug in the 8139too driver 0.9.25 (at least) shipped - with Linux 2.4.19, please upgrade to 8139too 0.9.26 (Linux 2.4.20 - or seperately at http://www.sourceforge.net/projects/gkernel/).

  10. - - -
  11. Q: There are already laptop-net's ifd and miid, why did you write - your own daemon?

    +

    This will force the execution of foo.html as CGI program, +regardless of the name of the file which identifies it as an HTML +file.

    -

    A: laptop-net was too integrated with its profile -system and didn't work on my hardware when I had a look on it. It -seemed easier to me to write a simple but feature complete replacement -than using laptop-net without most of the special features disabled. I -didn't know about miid when I wrote - ifplugd, but in any case ifplugd is much better -than miid. For a - comparison of miid and ifplugd, have a look on +

    If you have PHP configured in +your Apache web server you may mark a file as PHP script regardless of +its name:

    - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=162763&repeatmerged=yes

  12. -
+
setfattr -n "user.mime-type" -v "application/x-httpd-php" bar.html
+

Think twice before enabling mod_mime_xattr for document +trees you do not trust because a rogue user may mark his files as +executable CGI or PHP scripts with the technique described above.

Requirements

-

A newer Linux Kernel (I think 2.2 is good enough, alltough I tested it -only with 2.4) with a compatible device driver and -ethernet card. Most modern cards and drivers are compatible, like mine -which works with the 8139too driver.

+

A current release of Apache 1.3 with apxs, the development +headers and libraries installed. You need to install libattr +and its development package.

-

ifplugd was developed and tested on Debian GNU/Linux -"testing" from July 2003, it should work on most other Linux -distributions (and maybe Unix versions) since it uses GNU autoconf and -GNU libtool for source code configuration and shared library -management.

+

A port to other EA APIs has not been done yet. It should be fairly +easy to do, however. Feel free to send me patches!

-

The machine used was a Medion 9580-F laptop with a Realtek 8139 -network card and a PRISM1 PCMCIA wireless LAN card.

+

mod_mime_xattr was developed and tested on Debian GNU/Linux +"testing" from March 2004, it should work on most other Linux +distributions since it uses GNU autoconf source code configuration.

-

ifplugd needs libdaemon.

-

Installation

As this package is made with the GNU autotools you should run ./configure inside the distribution directory for configuring the source tree. After that you should run make for compilation and make install (as root) for installation of -ifplugd.

- -

The installation scripts create an init script in -${sysconfdir}/init.d/ifplugd, however no /etc/rc?.d/ links are created -for it.

- -

Extensive installation instructions for ifplugd are available at Geoff Ericksson's web site.

+mod_mime_xattr.

Acknowledgements

-

For the developers of mii-diag, ethtool and laptop-net, since I looked -on their source codes for learning how to use the link beat ioctls.

- -

Oliver Kurth for packaging ifplugd for Debian and ifplugd's -manpage

- -

Thomas Hood, Asgeir Nilsen, Sean Reifschneider, R. Steve McKown, David Mitchell, Norbert Preining, Herbert Graeber for patches

- -

Frederic Lepied for integrating ifplugd into Mandrake Linux

+

None so far

Download

The newest release is always available from @PACKAGE_URL@

-

The current release is @PACKAGE_VERSION@

- -

Get ifplugd's development sources from the Subversion repository.

- -

You may find an up to date Debian package of ifplugd on the Debian package repository.

- -

Packages for Mandrake Linux may be found in the Cooker distribution; Gentoo packages are available as well; SuSE packages are available courtesy of Herbert Graeber.

+

The current release is @PACKAGE_VERSION@

-

If you want to be notified whenever I release a new version of this software use the subscription feature of Freshmeat.

+

Get mod_mime_xattr's development sources from the Subversion repository.

-

New! There is a joint ifplugd and waproamd mailing list available.

+

If you want to be notified whenever I release a new version of this software use the subscription feature of Freshmeat.


-
Lennart Poettering <@PACKAGE_BUGREPORT@>, February 2004
+
Lennart Poettering <@PACKAGE_BUGREPORT@>, March 2004
$Id$
diff --git a/doc/style.css b/doc/style.css new file mode 100644 index 0000000..3499640 --- /dev/null +++ b/doc/style.css @@ -0,0 +1,32 @@ +/* $Id$ */ + +/*** + + Copyright 2004 Lennart Poettering + + Licensed under the Apache License, Version 2.0 (the "License"); you + may not use this file except in compliance with the License. You + may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + +***/ + +body { color: black; background-color: white; margin: 0.5cm; } +a:link, a:visited { color: #900000; } +p { margin-left: 0.5cm; margin-right: 0.5cm; } +div.news-date { margin-left: 0.5cm; font-size: 80%; color: #4f0000; } +p.news-text { margin-left: 1cm; } +h1 { color: #00009F; } +h2 { color: #00009F; } +h3 { color: #00004F; margin-left: 0.5cm; } +ul { margin-left: .5cm; } +ol { margin-left: .5cm; } +pre { margin-left: .5cm; background-color: #f0f0f0; padding: 0.4cm;} +.grey { color: #afafaf; } -- cgit