Add copyresolv to uth.

This commit is contained in:
Syahrial Agni Prasetya 2021-03-06 12:28:09 +07:00
parent 8791765ce5
commit 399d717bc4
No known key found for this signature in database
GPG Key ID: 46F88749C8C79383
5 changed files with 11 additions and 11 deletions

View File

@ -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 $?
;;

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
source /etc/archbox.conf
cp /etc/resolv.conf $CHROOT/etc/resolv.conf

View File

@ -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

8
uth.bash Normal file
View File

@ -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