[gparted/systemd-masking] Don't try to mask nonsense Systemd \xe2\x97\x8f.service (#129)
- From: Mike Fleetwood <mfleetwo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted/systemd-masking] Don't try to mask nonsense Systemd \xe2\x97\x8f.service (#129)
- Date: Sat, 9 Jan 2021 12:38:41 +0000 (UTC)
commit d5ddf907b872f409bc1f1a3670c53161c9e72fcc
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Mon Jan 4 21:46:56 2021 +0000
Don't try to mask nonsense Systemd \xe2\x97\x8f.service (#129)
With Systemd 246 on Fedora 33, running GParted reports this error and no
longer masks the system mount units when running:
$ gparted
Unit \xe2\x97\x8f.service does not exist, proceeding anyway.
Unit \xe2\x97\x8f.service does not exist, proceeding anyway.
GParted 1.1.0
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.3
$ systemctl list-units -t mount --full --all --no-legend
-.mount loaded active mounted Root Mount
boot.mount loaded active mounted /boot
dev-hugepages.mount loaded active mounted Huge Pages File System
dev-mqueue.mount loaded active mounted POSIX Message Queue File System
home.mount loaded active mounted /home
proc-fs-nfsd.mount loaded inactive dead NFSD configuration filesystem
proc-sys-fs-binfmt_misc.mount loaded inactive dead Arbitrary Executable File Formats File
System
run-user-1000-gvfs.mount loaded active mounted /run/user/1000/gvfs
run-user-1000.mount loaded active mounted /run/user/1000
run-user-42.mount loaded active mounted /run/user/42
sys-fs-fuse-connections.mount loaded active mounted FUSE Control File System
sys-kernel-config.mount loaded active mounted Kernel Configuration File System
sys-kernel-debug.mount loaded active mounted Kernel Debug File System
sys-kernel-tracing.mount loaded active mounted Kernel Trace File System
* sysroot.mount not-found inactive dead sysroot.mount
tmp.mount loaded active mounted Temporary Directory (/tmp)
var-lib-machines.mount loaded inactive dead Virtual Machine and Container Storage
(Compatibility)
var-lib-nfs-rpc_pipefs.mount loaded active mounted RPC Pipe File System
* var.mount not-found inactive dead var.mount
^
[Unicode Black Circle character (U+25CF) replaced with star to avoid
making this this commit message Unicode.]
Currently the gparted shell wrapper lists the Systemd mount units and
takes the first space separated column as the unit name to mask. If the
LOAD status of the unit not "loaded" then Systemd prefixes the name with
an optional Black Circle. Prior to Systemd 246 these extra 2 characters
at the start of the line, including the optional Black Circle, were
suppressed by the --no-legend option. But with Systemd 246 this no
longer happens. As the mount unit names no longer start in the first
character no units are masked; and as Unicode Black Circle character is
UTF-8 byte sequence E2 97 8F this error message is produced for each
highlighted line:
Unit \xe2\x97\x8f.service does not exist, proceeding anyway.
Fix by adding the --plain option to suppress the optional Black Circle
in the systemctl output. Confirmed this option is available in the
oldest supported distributions with Systemd.
RedHat / CentOS 7 Systemd 219 systemctl has --plain option.
Ubuntu 16.04 LTS Systemd 229 systemctl has --plain option.
Closes #129 - Unit \xe2\x97\x8f.service does not exist, proceeding
anyway
gparted.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gparted.in b/gparted.in
index e021eb25..7fa8b363 100755
--- a/gparted.in
+++ b/gparted.in
@@ -144,7 +144,7 @@ done
# Use systemctl to prevent automount by masking currently unmasked mount points
#
if test "x$HAVE_SYSTEMCTL" = "xyes"; then
- MOUNTLIST=`systemctl list-units --full --all -t mount --no-legend \
+ MOUNTLIST=`systemctl list-units --full --all -t mount --no-legend --plain \
| grep -v masked | cut -f1 -d' ' \
| egrep -v
'^(dev-hugepages|dev-mqueue|proc-sys-fs-binfmt_misc|run-user-.*-gvfs|sys-fs-fuse-connections|sys-kernel-config|sys-kernel-debug)'`
systemctl --runtime mask --quiet -- $MOUNTLIST
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]