aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/firstboot/24-create-resolv-symlink.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/files/firstboot/24-create-resolv-symlink.sh b/files/firstboot/24-create-resolv-symlink.sh
index e4a65b4..0dd09de 100644
--- a/files/firstboot/24-create-resolv-symlink.sh
+++ b/files/firstboot/24-create-resolv-symlink.sh
@@ -1,4 +1,13 @@
logger -t "rc.firstboot" "Creating /etc/resolv.conf symlink"
-if [ -f "/run/systemd/resolve/resolv.conf" ] ; then
+
+
+# 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
+
+ # Create symlink to /etc/reolv.conf
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
fi