Browse code

restart systemd-resolved after set unique hostname (bug 1665111)

Change-Id: Ie5a10cd739140d4458ca1fd7e8db24eb5537edb2
Reviewed-on: http://photon-jenkins.eng.vmware.com/996
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>

nickshize authored on 2016/05/25 11:06:34
Showing 1 changed files
... ...
@@ -99,6 +99,7 @@ cat << EOF >> $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/var/lib/cloud/seed/nocl
99 99
 runcmd:
100 100
   - (echo -ne 'photon-';cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 9)|xargs hostnamectl set-hostname
101 101
   - hostname | xargs -I '{}' sed -i 's/photon-.*$/{}/g' /etc/hosts
102
+  - systemctl status systemd-resolved >/dev/null || systemctl restart systemd-resolved
102 103
 EOF
103 104
 
104 105
 mount -o bind /proc $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/proc