This can cause lightdm to hang when the 'df' hangs - such as when an NFS mount becomes unresponsive. I have encountered this on a machine where remote SSH users had mounted an NFS share, which later became stuck, and I was unable to login via lightdm.
Perhaps some other way of checking for the mount could be used ( grep -q "^/cow / " /proc/mounts ? ), or a timeout could be added to the 'df':
In debian/patches/04_language_handling.patch, a 'df' is run, to check if lightdm is running in a 'live session':
(from this commit: 'Only set LANGUAGE if not in a live session'; https://github.com/canonical/lightdm/pull/111/commits/3b11df7c6461f637066e7031ad6edac398901798).
This can cause lightdm to hang when the 'df' hangs - such as when an NFS mount becomes unresponsive. I have encountered this on a machine where remote SSH users had mounted an NFS share, which later became stuck, and I was unable to login via lightdm.
Perhaps some other way of checking for the mount could be used (
grep -q "^/cow / " /proc/mounts
? ), or a timeout could be added to the 'df':timeout 5 df | grep -q ^/cow