Fix syntax errors and add update_resolv_conf check

Fix syntax errors and add update_resolv_conf check
Fix syntax errors