From d276b157d06899e2c7012f37c9c42cd59b48c639 Mon Sep 17 00:00:00 2001 From: lemniskett Date: Fri, 23 Oct 2020 19:09:43 +0700 Subject: [PATCH] Initial commit. --- archbox | 8 ++++++++ sv/run | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 archbox create mode 100755 sv/run diff --git a/archbox b/archbox new file mode 100755 index 0000000..5dfb764 --- /dev/null +++ b/archbox @@ -0,0 +1,8 @@ +#!/bin/bash + +CHROOT="/var/archlinux/root.x86_64" +COMMAND=$(echo $@ | tr ' ' '\ ') + +doas cp /etc/resolv.conf $CHROOT/etc/resolv.conf +[[ -z $@ ]] && doas chroot $CHROOT /bin/su lemniskett \ + || doas chroot $CHROOT su -c "$COMMAND" lemniskett diff --git a/sv/run b/sv/run new file mode 100755 index 0000000..c5eb236 --- /dev/null +++ b/sv/run @@ -0,0 +1,15 @@ +#!/bin/bash + +CHROOT="/var/archlinux/root.x86_64" + +mount -R /home $CHROOT/home +mount -t proc /proc $CHROOT/proc +mount -R /tmp $CHROOT/tmp +mount -R /sys $CHROOT/sys +mount -R /dev $CHROOT/dev +mount -R /run $CHROOT/run +mount -R /var/lib/dbus $CHROOT/var/lib/dbus +mount -R /lib/modules $CHROOT/lib/modules +mount -R /boot $CHROOT/boot + +while true; do sleep 10800; done