mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-06-30 23:05:09 +00:00
Compare commits
4 Commits
427f158890
...
991a5fb15f
Author | SHA1 | Date | |
---|---|---|---|
|
991a5fb15f | ||
|
6588ff7835 | ||
|
3e6f99ad69 | ||
|
8e37b5067c |
23
gparted.in
23
gparted.in
|
@ -27,12 +27,29 @@
|
|||
# along with GParted. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
display_msg() {
|
||||
MESSAGE="$1"
|
||||
TITLE="$2"
|
||||
printf "$MESSAGE\n"
|
||||
which yad >/dev/null
|
||||
yad_exists=$?
|
||||
if [ $yad_exists -eq 0 ]; then
|
||||
yad --center --width 300 --title="$TITLE" --button="OK:0" --text "$MESSAGE"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Only permit one instance of GParted to execute at a time
|
||||
#
|
||||
if pidof gpartedbin 1> /dev/null; then
|
||||
echo "The process gpartedbin is already running."
|
||||
echo "Only one gpartedbin process is permitted."
|
||||
display_msg "The process gpartedbin is already running.\n\nOnly one gpartedbin process is permitted."
|
||||
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
|
||||
|
||||
|
@ -51,7 +68,7 @@ if test "x`id -u`" != "x0"; then
|
|||
# privileges.
|
||||
#
|
||||
if test "x@gksuprog@" = "x"; then
|
||||
echo "Root privileges are required for running gparted."
|
||||
display_msg "Root privileges are required for running gparted."
|
||||
$BASE_CMD
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -26,6 +26,7 @@ gd
|
|||
gl
|
||||
gu
|
||||
he
|
||||
hi
|
||||
hr
|
||||
hu
|
||||
id
|
||||
|
|
Loading…
Reference in New Issue
Block a user