On Tue, Mar 22, 2011 at 02:52:05PM +0100, Corvus Corax wrote:
> --- Filesystem        2011-03-22 14:49:58.103845191 +0100
> +++ Filesystem_lw     2011-03-22 14:49:32.396825985 +0100
> @@ -186,7 +186,9 @@
>  # Take advantage of /etc/mtab if present, use portable mount command
>  # otherwise. Normalize format to "dev mountpoint fstype".
>  list_mounts() {
> -     if [ -f "/etc/mtab" -a -r "/etc/mtab" ]; then
> +     if [ -f "/proc/mounts" -a -r "/proc/mounts" ]; then
> +             cut -d' ' -f1,2,3 </proc/mounts
> +     elif [ -f "/etc/mtab" -a -r "/etc/mtab" ]; then
>               cut -d' ' -f1,2,3 </etc/mtab
>       else
>               $MOUNT | cut -d' ' -f1,3,5


IIRC, it was a concious decision to prefer /etc/mtab over /proc/mounts
because it is needed for bind mounts, and various other aspects.

The exact reasons probably deserve some comments in the script.
If someone can remember a bit more detail?

You are of course free to symlink /etc/mtab to /proc/mounts,
if you feel that this is useful for your setup.


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to