Fixed setting DNS in rc.local

This commit is contained in:
Dionysus 2024-02-13 15:27:29 -05:00
parent 0d082be8f0
commit 8c8e3ec8a8
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
1 changed files with 2 additions and 2 deletions

4
vps
View File

@ -1,7 +1,7 @@
#!/bin/bash
# enter the void (vps) - developed by acidvegas (https://git.acid.vegas/void)
# xbps-install -Su && xbps-install -u xbps && xbps-install wget && wget https://git.acid.vegas/void/raw/branch/master/vps && chmod +x vps && ./vps root
# xbps-install -Su && xbps-install -u xbps && xbps-install wget && wget https://git.supernets.org/acidvegas/void/raw/branch/master/vps && chmod +x vps && ./vps root
set -xev
@ -43,7 +43,7 @@ setup_chroot() {
IP_ADDR=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)
GATEWAY=$(ip route show default | awk '/default/ {print $3}')
printf "ip link set eth0 up\nip addr add ${IP_ADDR}/24 dev eth0\nip route add default via $GATEWAY\n" > /etc/rc.local
printf "nameserver 208.67.222.222\nnameserver 208.67.220.220\nnameserver 2620:119:35::35\nnameserver 2620:119:53::53\n" >> /etc/rc.local
printf "printf \"nameserver 208.67.222.222\\\nnameserver 208.67.220.220\\\nnameserver 2620:119:35::35\\\nnameserver 2620:119:53::53\" > /etc/resolv.conf" >> /etc/rc.local
>/var/log/lastlog && chattr +i /var/log/lastlog