cphosts() will be moved to dchr-bs

This commit is contained in:
DarkCat09 2024-04-09 10:48:21 +04:00
parent bc6e29c3fb
commit 1dcddba5f9
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

14
run.sh
View file

@ -26,19 +26,6 @@ setup () {
mount -o bind /run "$1/run"
}
cphosts () {
if ! [ -e "$1/etc/hosts" ]
then
echo '-- Copying hosts'
cp /etc/hosts "$1/etc/hosts"
fi
if ! [ -e "$1/etc/resolv.conf" ]
then
echo '-- Copying resolv.conf'
cp /etc/resolv.conf "$1/etc/resolv.conf"
fi
}
runcmd () {
echo -e '-- \e[1;32mOK\e[0m -- running chroot'
chroot "$1" "$2"
@ -58,7 +45,6 @@ main () {
trap "clean $chrdir" EXIT
setup "$chrdir"
cphosts "$chrdir"
runcmd "$chrdir" "$chrcmd"
exit $?
}