Make variables only accessible to user.
This commit is contained in:
parent
7fcc8d2ad0
commit
715fc2259a
@ -12,7 +12,7 @@ asroot(){
|
|||||||
|
|
||||||
storeenv() {
|
storeenv() {
|
||||||
echo "# This will be sourced when entering Archbox" > /tmp/archbox_env
|
echo "# This will be sourced when entering Archbox" > /tmp/archbox_env
|
||||||
chmod 777 /tmp/archbox_env >/dev/null 2>&1
|
$PRIV $PREFIX/share/archbox/bin/uth chownvar $USER
|
||||||
[[ ! -z $WAYLAND_DISPLAY ]] && echo "WAYLAND_DISPLAY=$WAYLAND_DISPLAY" >> /tmp/archbox_env
|
[[ ! -z $WAYLAND_DISPLAY ]] && echo "WAYLAND_DISPLAY=$WAYLAND_DISPLAY" >> /tmp/archbox_env
|
||||||
if [[ ! -z $DISPLAY ]]; then
|
if [[ ! -z $DISPLAY ]]; then
|
||||||
hash xhost >/dev/null 2>&1 && xhost +local: > /dev/null
|
hash xhost >/dev/null 2>&1 && xhost +local: > /dev/null
|
||||||
@ -84,7 +84,7 @@ case $1 in
|
|||||||
msg "Mounting necessary filesystems..."
|
msg "Mounting necessary filesystems..."
|
||||||
$PREFIX/share/archbox/bin/init start
|
$PREFIX/share/archbox/bin/init start
|
||||||
cp $PREFIX/share/archbox/chroot_setup.bash $CHROOT/chroot_setup
|
cp $PREFIX/share/archbox/chroot_setup.bash $CHROOT/chroot_setup
|
||||||
echo $USER > /tmp/archbox_user
|
echo $ARCHBOX_USER > /tmp/archbox_user
|
||||||
chroot $CHROOT /bin/bash -c "/chroot_setup"
|
chroot $CHROOT /bin/bash -c "/chroot_setup"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
USER="lemniskett"
|
ARCHBOX_USER="lemniskett"
|
||||||
PRIV="sudo"
|
PRIV="sudo"
|
||||||
INSTALL_PATH="/var/archlinux"
|
INSTALL_PATH="/var/archlinux"
|
||||||
CHROOT="$INSTALL_PATH/root.x86_64"
|
CHROOT="$INSTALL_PATH/root.x86_64"
|
||||||
|
@ -10,4 +10,4 @@ REQ_ENV+="XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR "
|
|||||||
|
|
||||||
ENV="$REQ_ENV $ENV_VAR"
|
ENV="$REQ_ENV $ENV_VAR"
|
||||||
COMMAND="$@"
|
COMMAND="$@"
|
||||||
chroot $CHROOT /sbin/env $ENV /bin/su $USER
|
chroot $CHROOT /sbin/env $ENV /bin/su $ARCHBOX_USER
|
@ -10,4 +10,4 @@ REQ_ENV+="XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR "
|
|||||||
|
|
||||||
ENV="$REQ_ENV $ENV_VAR"
|
ENV="$REQ_ENV $ENV_VAR"
|
||||||
COMMAND="$@"
|
COMMAND="$@"
|
||||||
chroot $CHROOT /bin/su -c "env $ENV $COMMAND" $USER
|
chroot $CHROOT /bin/su -c "env $ENV $COMMAND" $ARCHBOX_USER
|
Loading…
Reference in New Issue
Block a user