From a0fb747dca1a49527f026d7acdbe1a9fcf61a390 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 6 Feb 2017 19:47:25 +0000 Subject: Prevent udisks2-based auto-mounters operating during installation (mga#20247). Use udisks2-inhibit if it is available and if the udisks2 daemon is running. Fall back to udisks --inhibit (which only works for the older udisks daemon) if not. This prevents file/volume managers such as Thunar from auto-mounting disks during the partitioning stage of installation, which can cause partitioning to fail and cause the system to be installed on the wrong partition. --- draklive-install-lock-storage | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/draklive-install-lock-storage b/draklive-install-lock-storage index 0f7101e..8d42a5b 100755 --- a/draklive-install-lock-storage +++ b/draklive-install-lock-storage @@ -2,6 +2,11 @@ CMD=/usr/sbin/draklive-install -/usr/bin/udisks --inhibit -- $CMD +ps -C udisksd > /dev/null +if [ $? -eq 0 -a -x /usr/lib/udisks2/udisks2-inhibit ] ; then + /usr/lib/udisks2/udisks2-inhibit $CMD +else + /usr/bin/udisks --inhibit -- $CMD +fi # run without udisks lock if it fails [ "$?" != 0 ] && $CMD -- cgit v1.2.1