Revert "Bring XDG_RUNTIME_DIR variable to chroot"
This reverts commit 0e7434a12a
.
This commit is contained in:
parent
21dcb183ec
commit
4a0eeb1f61
@ -14,9 +14,8 @@ asroot(){
|
||||
[[ $EUID -ne 0 ]] && err "Run this as root!"
|
||||
}
|
||||
|
||||
storeenv(){
|
||||
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" > /tmp/env_archbox
|
||||
echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >> /tmp/env_archbox
|
||||
storedbus(){
|
||||
echo $DBUS_SESSION_BUS_ADDRESS > /tmp/archbox_dbus_session_address
|
||||
}
|
||||
|
||||
help_text(){
|
||||
@ -79,7 +78,7 @@ case $1 in
|
||||
chroot $CHROOT /bin/bash -c "sh /chroot_setup"
|
||||
;;
|
||||
--enter)
|
||||
storeenv
|
||||
storedbus
|
||||
copyresolv
|
||||
$PRIV /usr/local/share/archbox/bin/archbox enter
|
||||
;;
|
||||
@ -93,7 +92,7 @@ case $1 in
|
||||
err "Unknown option: $1"
|
||||
;;
|
||||
*)
|
||||
storeenv
|
||||
storedbus
|
||||
copyresolv
|
||||
COMMAND=$(echo $@ | tr ' ' '\ ')
|
||||
$PRIV /usr/local/share/archbox/bin/archbox $COMMAND
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
source /etc/archbox.conf
|
||||
|
||||
ENV="$(cat /tmp/env_archbox)"
|
||||
DBUS_ADDRESS="$(cat /tmp/archbox_dbus_session_address)"
|
||||
COMMAND=$(echo $@ | tr ' ' '\ ')
|
||||
[[ $1 = "enter" ]] && chroot $CHROOT /sbin/env $ENV /bin/su $USER \
|
||||
|| chroot $CHROOT /bin/su -c "env $ENV $COMMAND" $USER
|
||||
[[ $1 = "enter" ]] && chroot $CHROOT /sbin/env DBUS_SESSION_BUS_ADDRESS=$DBUS_ADDRESS /bin/su $USER \
|
||||
|| chroot $CHROOT /bin/su -c "env DBUS_SESSION_BUS_ADDRESS=$DBUS_ADDRESS $COMMAND" $USER
|
||||
|
Loading…
Reference in New Issue
Block a user