From 3c0d4b7dfd31e334d2e84fcf2cf3894bf809f600 Mon Sep 17 00:00:00 2001 From: lemniskett Date: Mon, 2 Nov 2020 16:51:43 +0700 Subject: [PATCH] Pulseaudio dirty fix on musl-based distros. --- README.md | 2 +- archbox.bash | 4 ++++ install.sh | 1 + remount_run.bash | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 remount_run.bash diff --git a/README.md b/README.md index ce9bb32..ef51756 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ If you use runit, copy archbox folder inside ```runit/``` to whatever your distr You may want to add this if you don't want to run archbox chroot without password : #### Sudo ``` -%wheel ALL=(root) NOPASSWD: /usr/local/share/archbox/bin/archbox,/usr/local/share/archbox/bin/copyresolv +%wheel ALL=(root) NOPASSWD: /usr/local/share/archbox/bin/archbox,/usr/local/share/archbox/bin/copyresolv,/usr/local/share/archbox/bin/remount_run ``` #### Doas ``` diff --git a/archbox.bash b/archbox.bash index e664807..f3812ad 100755 --- a/archbox.bash +++ b/archbox.bash @@ -27,6 +27,7 @@ OPTIONS: -c, --create URL Creates a chroot enviroment. -e, --enter Enters chroot enviroment. -h, --help Displays this help message. + --remount-run Remount /run in chroot enviroment. EOF } @@ -83,6 +84,9 @@ case $1 in copyresolv $PRIV /usr/local/share/archbox/bin/archbox enter ;; + --remount-run) + $PRIV /usr/local/share/archbox/bin/remount_run + ;; -h|--help) help_text ;; diff --git a/install.sh b/install.sh index fd92865..2f3a5f0 100755 --- a/install.sh +++ b/install.sh @@ -5,4 +5,5 @@ install -v -D -m 755 ./archbox.bash /usr/local/bin/archbox [[ ! -e /etc/archbox.conf ]] && install -v -D -m 755 ./archbox.conf /etc/archbox.conf install -v -D -m 755 ./copyresolv.bash /usr/local/share/archbox/bin/copyresolv install -v -D -m 755 ./archboxcommand.bash /usr/local/share/archbox/bin/archbox +install -v -D -m 755 ./remount_run.bash /usr/local/share/archbox/bin/remount_run install -v -D -m 755 ./chroot_setup.bash /usr/local/share/archbox/chroot_setup.bash diff --git a/remount_run.bash b/remount_run.bash new file mode 100755 index 0000000..d031444 --- /dev/null +++ b/remount_run.bash @@ -0,0 +1,6 @@ +#!/bin/bash + +source /etc/archbox.conf + +umount -l $CHROOT/run +mount --rbind /run $CHROOT/run