From 399d717bc433cbcaab8f813e7571d6329c64ec82 Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Sat, 6 Mar 2021 12:28:09 +0700 Subject: [PATCH] Add copyresolv to uth. --- archbox.bash | 8 ++------ copyresolv.bash | 4 ---- archboxcommand.bash => exec.bash | 0 install.sh | 2 +- uth.bash | 8 ++++++++ 5 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 copyresolv.bash rename archboxcommand.bash => exec.bash (100%) create mode 100644 uth.bash diff --git a/archbox.bash b/archbox.bash index 20bc920..6c5046f 100644 --- a/archbox.bash +++ b/archbox.bash @@ -6,10 +6,6 @@ checkdep(){ hash $1 2>/dev/null || err "Install $1!" } -copyresolv(){ - $PRIV $PREFIX/share/archbox/bin/copyresolv -} - asroot(){ [[ $EUID -ne 0 ]] && err "Run this as root!" } @@ -94,7 +90,7 @@ case $1 in ;; -e|--enter) storeenv - copyresolv + $PRIV $PREFIX/share/archbox/bin/uth copyresolv $PRIV $PREFIX/share/archbox/bin/archbox enter exit $? ;; @@ -129,7 +125,7 @@ case $1 in ;; *) storeenv - copyresolv + $PRIV $PREFIX/share/archbox/bin/uth copyresolv $PRIV $PREFIX/share/archbox/bin/archbox $@ exit $? ;; diff --git a/copyresolv.bash b/copyresolv.bash deleted file mode 100644 index 2806988..0000000 --- a/copyresolv.bash +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -source /etc/archbox.conf -cp /etc/resolv.conf $CHROOT/etc/resolv.conf diff --git a/archboxcommand.bash b/exec.bash similarity index 100% rename from archboxcommand.bash rename to exec.bash diff --git a/install.sh b/install.sh index 813bdf8..7953757 100755 --- a/install.sh +++ b/install.sh @@ -6,11 +6,11 @@ mkdir -p $PREFIX/share/archbox/bin install -v -D -m 755 ./archbox.bash $PREFIX/bin/archbox install -v -D -m 755 ./archbox-desktop.bash $PREFIX/bin/archbox-desktop [[ ! -e /etc/archbox.conf ]] && install -v -D -m 755 ./archbox.conf /etc/archbox.conf -install -v -D -m 755 ./copyresolv.bash $PREFIX/share/archbox/bin/copyresolv install -v -D -m 755 ./archboxcommand.bash $PREFIX/share/archbox/bin/archbox install -v -D -m 755 ./remount_run.bash $PREFIX/share/archbox/bin/remount_run install -v -D -m 755 ./chroot_setup.bash $PREFIX/share/archbox/chroot_setup.bash install -v -D -m 755 ./archboxinit.bash $PREFIX/share/archbox/bin/archboxinit +install -v -D -m 755 ./uth.bash $PREFIX/share/archbox/bin/uth grep 'PREFIX=' /etc/archbox.conf >/dev/null 2>&1 || cat << EOF >> /etc/archbox.conf diff --git a/uth.bash b/uth.bash new file mode 100644 index 0000000..76d4588 --- /dev/null +++ b/uth.bash @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +source /etc/archbox.conf + +case $1 in + copyresolv) + cp /etc/resolv.conf $CHROOT/etc/resolv.conf + ;; +esac \ No newline at end of file