From 2e927d4bc4b1be909bbf4da9987ce4658924903e Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sat, 16 Jan 2021 16:33:02 +0000 Subject: [PATCH] Make gparted shell wrapper report exit status from gpartedbin gparted shell wrapper always exits with a 0 status even if gpartedbin fails. For example make gpartedbin fail with a non-zero exit status like this: $ (unset DISPLAY; unset XAUTHORITY; /usr/sbin/gpartedbin) (gpartedbin:3936): Gtk-WARNING **: 16:36:06.263: cannot open display: $ echo $? 1 However the gparted shell wrapper instead exits with successful status 0: $ (unset DISPLAY; unset XAUTHORITY; gparted) (gpartedbin:4282): Gtk-WARNING **: 16:39:23.514: cannot open display: $ echo $? 0 Fix this. --- gparted.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gparted.in b/gparted.in index 89e616c0..d198ad71 100755 --- a/gparted.in +++ b/gparted.in @@ -219,6 +219,7 @@ elif test "x$HAVE_HAL_LOCK" = "xyes"; then else $BASE_CMD fi +status=$? # # Clear any temporary override udev rules used to stop udev automatically @@ -234,3 +235,5 @@ done if test "x$HAVE_SYSTEMCTL" = "xyes"; then systemctl --runtime unmask --quiet -- $MOUNTLIST fi + +exit $status