aboutsummaryrefslogtreecommitdiff
path: root/files/firstboot/25-create-resolv-symlink.sh
diff options
context:
space:
mode:
authorJan Wagner <mail@jwagner.eu>2016-04-19 15:10:50 +0200
committerJan Wagner <mail@jwagner.eu>2016-04-19 15:10:50 +0200
commitd0f91512d9ca6d361d8a4a387094c48aab00e111 (patch)
treeb00ed220e2fa04bdb1db43475a8149d01d1be5db /files/firstboot/25-create-resolv-symlink.sh
parent7878e85af7748d531a64f459723dca76ee37914b (diff)
downloadrpi2-gen-image-d0f91512d9ca6d361d8a4a387094c48aab00e111.tar.gz
rpi2-gen-image-d0f91512d9ca6d361d8a4a387094c48aab00e111.tar.bz2
rpi2-gen-image-d0f91512d9ca6d361d8a4a387094c48aab00e111.zip
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanupHEADmaster
Diffstat (limited to 'files/firstboot/25-create-resolv-symlink.sh')
-rw-r--r--files/firstboot/25-create-resolv-symlink.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/files/firstboot/25-create-resolv-symlink.sh b/files/firstboot/25-create-resolv-symlink.sh
new file mode 100644
index 0000000..8a3f00b
--- /dev/null
+++ b/files/firstboot/25-create-resolv-symlink.sh
@@ -0,0 +1,15 @@
+logger -t "rc.firstboot" "Creating /etc/resolv.conf symlink"
+
+# Check if systemd resolve directory exists
+if [ ! -d "/run/systemd/resolve" ] ; then
+ systemctl enable systemd-resolved.service
+ systemctl restart systemd-resolved.service
+fi
+
+# 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