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!"
|
[[ $EUID -ne 0 ]] && err "Run this as root!"
|
||||||
}
|
}
|
||||||
|
|
||||||
storeenv(){
|
storedbus(){
|
||||||
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" > /tmp/env_archbox
|
echo $DBUS_SESSION_BUS_ADDRESS > /tmp/archbox_dbus_session_address
|
||||||
echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >> /tmp/env_archbox
|
|
||||||
}
|
}
|
||||||
|
|
||||||
help_text(){
|
help_text(){
|
||||||
@ -79,7 +78,7 @@ case $1 in
|
|||||||
chroot $CHROOT /bin/bash -c "sh /chroot_setup"
|
chroot $CHROOT /bin/bash -c "sh /chroot_setup"
|
||||||
;;
|
;;
|
||||||
--enter)
|
--enter)
|
||||||
storeenv
|
storedbus
|
||||||
copyresolv
|
copyresolv
|
||||||
$PRIV /usr/local/share/archbox/bin/archbox enter
|
$PRIV /usr/local/share/archbox/bin/archbox enter
|
||||||
;;
|
;;
|
||||||
@ -93,7 +92,7 @@ case $1 in
|
|||||||
err "Unknown option: $1"
|
err "Unknown option: $1"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
storeenv
|
storedbus
|
||||||
copyresolv
|
copyresolv
|
||||||
COMMAND=$(echo $@ | tr ' ' '\ ')
|
COMMAND=$(echo $@ | tr ' ' '\ ')
|
||||||
$PRIV /usr/local/share/archbox/bin/archbox $COMMAND
|
$PRIV /usr/local/share/archbox/bin/archbox $COMMAND
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
source /etc/archbox.conf
|
source /etc/archbox.conf
|
||||||
|
|
||||||
ENV="$(cat /tmp/env_archbox)"
|
DBUS_ADDRESS="$(cat /tmp/archbox_dbus_session_address)"
|
||||||
COMMAND=$(echo $@ | tr ' ' '\ ')
|
COMMAND=$(echo $@ | tr ' ' '\ ')
|
||||||
[[ $1 = "enter" ]] && chroot $CHROOT /sbin/env $ENV /bin/su $USER \
|
[[ $1 = "enter" ]] && chroot $CHROOT /sbin/env DBUS_SESSION_BUS_ADDRESS=$DBUS_ADDRESS /bin/su $USER \
|
||||||
|| chroot $CHROOT /bin/su -c "env $ENV $COMMAND" $USER
|
|| chroot $CHROOT /bin/su -c "env DBUS_SESSION_BUS_ADDRESS=$DBUS_ADDRESS $COMMAND" $USER
|
||||||
|
Loading…
Reference in New Issue
Block a user