saltstack/salt — pull request #8725 by mgwilliams (2013-11-21 21:31:22+00:00)
Title: add alt_device (output of mount -l) and follow symlinks

Per discussion with @techhat on #6397 and on IRC.

This covers two different edge cases:

1) ``/proc/self/mountinfo`` sometimes returns a device other than the value originally passed to ``mount``. This is the case, for example, when an ISO is mounted. ``alt_device`` is added here with the output of ``mount -l``.

2) If the mountpoint is itself a symlink, both ``/proc/self/mountinfo`` and ``mount -l`` will report the real name (target) of the symlink, so subsequent runs of ``mount.mounted`` would previously remount on every state run, detecting that the mountpoint had changed. This fixes that too.