Skip to content

Instantly share code, notes, and snippets.

@jeffmccune
Last active September 16, 2020 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffmccune/4671d9aeb90a0a3f122e058cbdf7c6f0 to your computer and use it in GitHub Desktop.
Save jeffmccune/4671d9aeb90a0a3f122e058cbdf7c6f0 to your computer and use it in GitHub Desktop.
Work around dhclient -x breaking policy routing when google-guest-agent starts
#!/bin/bash
#
# See https://github.com/GoogleCloudPlatform/guest-agent/issues/76
tmpfile="$(mktemp)"
cat <<"EOF" >"$tmpfile"
logmessage "Skipping ip -4 addr del ${old_ip_address:-}/${old_prefix:-} dev ${interface:-} to work around https://github.com/GoogleCloudPlatform/guest-agent/issues/76"
exit_with_hooks 0
EOF
install -o 0 -g 0 -m 0755 "$tmpfile" /etc/dhcp/dhclient-down-hooks
rm -f "$tmpfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment