2020-10-27 06:12:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source /etc/archbox.conf
|
2020-10-28 16:06:06 +00:00
|
|
|
|
2020-10-29 05:10:52 +00:00
|
|
|
ENV="$(cat /tmp/env_archbox)"
|
2020-10-27 07:22:51 +00:00
|
|
|
COMMAND=$(echo $@ | tr ' ' '\ ')
|
2020-10-29 05:10:52 +00:00
|
|
|
[[ $1 = "enter" ]] && chroot $CHROOT /sbin/env $ENV /bin/su $USER \
|
|
|
|
|| chroot $CHROOT /bin/su -c "env $ENV $COMMAND" $USER
|