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