diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-02-06 19:47:25 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-02-06 19:47:25 +0000 |
commit | a0fb747dca1a49527f026d7acdbe1a9fcf61a390 (patch) | |
tree | d79083e133ee25012f5e7f3dd479c59788057d3a /draklive-install-lock-storage | |
parent | 4e887b3ee08c7b64204d032bfad66bb1f10bc165 (diff) | |
download | draklive-install-a0fb747dca1a49527f026d7acdbe1a9fcf61a390.tar draklive-install-a0fb747dca1a49527f026d7acdbe1a9fcf61a390.tar.gz draklive-install-a0fb747dca1a49527f026d7acdbe1a9fcf61a390.tar.bz2 draklive-install-a0fb747dca1a49527f026d7acdbe1a9fcf61a390.tar.xz draklive-install-a0fb747dca1a49527f026d7acdbe1a9fcf61a390.zip |
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.
Diffstat (limited to 'draklive-install-lock-storage')
-rwxr-xr-x | draklive-install-lock-storage | 7 |
1 files changed, 6 insertions, 1 deletions
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 |