aboutsummaryrefslogtreecommitdiff
path: root/files/firstboot/24-create-resolv-symlink.sh
diff options
context:
space:
mode:
Diffstat (limited to 'files/firstboot/24-create-resolv-symlink.sh')
-rw-r--r--files/firstboot/24-create-resolv-symlink.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/files/firstboot/24-create-resolv-symlink.sh b/files/firstboot/24-create-resolv-symlink.sh
index 0dd09de..8a3f00b 100644
--- a/files/firstboot/24-create-resolv-symlink.sh
+++ b/files/firstboot/24-create-resolv-symlink.sh
@@ -1,13 +1,15 @@
logger -t "rc.firstboot" "Creating /etc/resolv.conf symlink"
-
# Check if systemd resolve directory exists
-if [ -d "/run/systemd/resolve" ] ; then
- # Create resolv.conf file if it does not exists
- if [ ! -f "/run/systemd/resolve/resolv.conf" ] ; then
- touch /run/systemd/resolve/resolv.conf
- fi
+if [ ! -d "/run/systemd/resolve" ] ; then
+ systemctl enable systemd-resolved.service
+ systemctl restart systemd-resolved.service
+fi
- # Create symlink to /etc/reolv.conf
- ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
+# Create resolv.conf file if it does not exists
+if [ ! -f "/run/systemd/resolve/resolv.conf" ] ; then
+ touch /run/systemd/resolve/resolv.conf
fi
+
+# Create symlink to /etc/reolv.conf
+ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf