aboutsummaryrefslogtreecommitdiff
path: root/files/firstboot/24-create-resolv-symlink.sh
blob: 0dd09de252e5d12e49f3264117e10c17789baa00 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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

  # Create symlink to /etc/reolv.conf
  ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
fi