Don't use a separate code path to forward DBUS_SYSTEM_BUS_ADDRESS
https://github.com/debarshiray/toolbox/issues/104
This commit is contained in:
parent
cfcb5e74dd
commit
a4fcb81f24
1 changed files with 2 additions and 10 deletions
12
toolbox
12
toolbox
|
@ -28,6 +28,7 @@ container_name_regexp="[a-zA-Z0-9][a-zA-Z0-9_.-]*"
|
||||||
|
|
||||||
environment_variables="COLORTERM \
|
environment_variables="COLORTERM \
|
||||||
DBUS_SESSION_BUS_ADDRESS \
|
DBUS_SESSION_BUS_ADDRESS \
|
||||||
|
DBUS_SYSTEM_BUS_ADDRESS \
|
||||||
DESKTOP_SESSION \
|
DESKTOP_SESSION \
|
||||||
DISPLAY \
|
DISPLAY \
|
||||||
LANG \
|
LANG \
|
||||||
|
@ -789,10 +790,6 @@ enter()
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DBUS_SYSTEM_BUS_ADDRESS" != "" ]; then
|
|
||||||
set_dbus_system_bus_address="--env DBUS_SYSTEM_BUS_ADDRESS=$DBUS_SYSTEM_BUS_ADDRESS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
set_environment=$(create_environment_options)
|
set_environment=$(create_environment_options)
|
||||||
|
|
||||||
echo "$base_toolbox_command: looking for $SHELL in container $toolbox_container" >&3
|
echo "$base_toolbox_command: looking for $SHELL in container $toolbox_container" >&3
|
||||||
|
@ -809,7 +806,6 @@ enter()
|
||||||
# for the command passed to capsh
|
# for the command passed to capsh
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$prefix_sudo podman exec \
|
$prefix_sudo podman exec \
|
||||||
$set_dbus_system_bus_address \
|
|
||||||
$set_environment \
|
$set_environment \
|
||||||
--interactive \
|
--interactive \
|
||||||
--tty \
|
--tty \
|
||||||
|
@ -1141,10 +1137,6 @@ forward_to_host()
|
||||||
(
|
(
|
||||||
eval "set -- $arguments"
|
eval "set -- $arguments"
|
||||||
|
|
||||||
if [ "$DBUS_SYSTEM_BUS_ADDRESS" != "" ]; then
|
|
||||||
set_dbus_system_bus_address="--env=DBUS_SYSTEM_BUS_ADDRESS=$DBUS_SYSTEM_BUS_ADDRESS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
set_environment=$(create_environment_options)
|
set_environment=$(create_environment_options)
|
||||||
|
|
||||||
echo "$base_toolbox_command: forwarding to host:" >&3
|
echo "$base_toolbox_command: forwarding to host:" >&3
|
||||||
|
@ -1154,7 +1146,7 @@ forward_to_host()
|
||||||
done
|
done
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
flatpak-spawn $set_dbus_system_bus_address $set_environment --host "$0" "$@" 2>&3
|
flatpak-spawn $set_environment --host "$0" "$@" 2>&3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue