diff options
author | José Bollo <jose.bollo@open.eurogiciel.org> | 2015-04-29 15:58:13 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@open.eurogiciel.org> | 2015-04-29 15:58:13 +0200 |
commit | 2ea4776a002745174ca295a89aa7fdcfc255725e (patch) | |
tree | fdf19cf51dfee7142ccbf2eea6ff5a64c373e731 | |
parent | f2d840a89d4061501c102a687580e17a4881ea3b (diff) | |
download | dbus-2ea4776a002745174ca295a89aa7fdcfc255725e.tar.gz dbus-2ea4776a002745174ca295a89aa7fdcfc255725e.tar.bz2 dbus-2ea4776a002745174ca295a89aa7fdcfc255725e.zip |
packaging: remove character class negation for sed
When running the command sed provided by toybox, the expression
[^[:cntrl:]] is not understood, what forbids to detect DBUS and
cause further errors.
This patch removes this expression.
Change-Id: If30543fadddf8b6811e14b548a747be99612894b
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
-rw-r--r-- | packaging/dbus.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packaging/dbus.sh b/packaging/dbus.sh index 7d600c17..d9b0a5db 100644 --- a/packaging/dbus.sh +++ b/packaging/dbus.sh @@ -5,7 +5,7 @@ if [[ -z "$DBUS_SESSION_BUS_ADDRESS" ]]; then systemd_pid=$(pgrep -U $UID systemd | head -1) if [[ -n "$systemd_pid" ]]; then - val=$(sed '/\<DBUS_SESSION_BUS_ADDRESS=/!d ; s/.*\<DBUS_SESSION_BUS_ADDRESS=\([^[:cntrl:]]*\).*/\1/' /proc/${systemd_pid}/environ) + val=$(tr '\0' '\n' < /proc/${systemd_pid}/environ | sed '/^DBUS_SESSION_BUS_ADDRESS=/!d ; s/[^=]*=//') [[ -n "$val" ]] && export DBUS_SESSION_BUS_ADDRESS=$val fi fi |