Stop GParted launch if Rescuezilla running (#158)

Prevents GParted from launching when the Rescuezilla (Clonezilla GUI) is
running, which prevents conflicts between the two tools. Rescuezilla is a
popular GTK frontend to Partclone and Clonezilla (analogous to GParted and GNU
Parted).

Users running both GParted and Rescuezilla simultaneously are at risk of race
conditions and data corruption, so enforcing mutual exclusion is vital. A
similar mutual exclusion test is already used in GParted to prevent two
instances of GParted from running simultaneously.

Rescuezilla's launch script [1] is based on GParted's script due to its
identical need to shutdown automount services, and Rescuezilla's live
environment's GParted launch script already has this change applied as mutual
exclusion is vital for safe operation.

[1] https://github.com/rescuezilla/rescuezilla/blob/master/src/apps/rescuezilla/rescuezilla/usr/sbin/rescuezilla

Closes #158 - Mutual exclusion with Rescuezilla (Clonezilla GUI)
This commit is contained in:
Shasheen Ediriweera 2021-06-15 18:02:12 +09:30
parent 8e37b5067c
commit 3e6f99ad69

View file

@ -46,6 +46,13 @@ if pidof gpartedbin 1> /dev/null; then
exit 1
fi
# Only permit GParted to launch if Rescuezilla (Clonezilla GUI) is not running.
#
if test "x`ps -e | grep rescuezillapy`" != "x"; then
display_msg "Cannot launch GParted because the process rescuezillapy is running.\n\nClose Rescuezilla then try again."
exit 1
fi
#
# Define base command for executing GParted
#