aboutsummaryrefslogtreecommitdiff
path: root/files/firstboot/24-create-resolv-symlink.sh
diff options
context:
space:
mode:
authorJan Wagner <mail@jwagner.eu>2016-03-25 21:58:11 +0100
committerJan Wagner <mail@jwagner.eu>2016-03-25 21:58:11 +0100
commitb33dfc51ccafb9172c0a29c0e4376f0db8b9e3f1 (patch)
tree918f5d661c091cdac6bd6bcc28f677d0993f4369 /files/firstboot/24-create-resolv-symlink.sh
parent50170a27d4119c047344793bb7aec685acb3ad6e (diff)
downloadrpi2-gen-image-b33dfc51ccafb9172c0a29c0e4376f0db8b9e3f1.tar.gz
rpi2-gen-image-b33dfc51ccafb9172c0a29c0e4376f0db8b9e3f1.tar.bz2
rpi2-gen-image-b33dfc51ccafb9172c0a29c0e4376f0db8b9e3f1.zip
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
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