Use sudo when removing openshift.conf file 99/1299/1
authorYolanda Robla <yroblamo@redhat.com>
Thu, 1 Aug 2019 07:44:31 +0000 (09:44 +0200)
committerYolanda Robla <yroblamo@redhat.com>
Thu, 1 Aug 2019 07:44:31 +0000 (09:44 +0200)
Otherwise it cannot be removed when ran with
jenkins user

Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
Change-Id: I94b827dbf5c1de8bb6c62a6d5fc2fec1da3176b6

utils/prep_host.sh

index 5a1a38a..02c37e4 100755 (executable)
@@ -75,7 +75,7 @@ EOF
     echo -e "[main]\ndns=dnsmasq" | sudo tee "${dnsconf}"
 
     dnsmasqconf=/etc/NetworkManager/dnsmasq.d/openshift.conf
-    rm $dnsmasqconf
+    sudo rm $dnsmasqconf
     echo server=/$cluster_domain/192.168.126.1 | sudo tee "${dnsmasqconf}"
     echo address=/.apps.$cluster_domain/192.168.126.51 | sudo tee -a "${dnsmasqconf}"
     sudo systemctl restart NetworkManager