Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SeamlessDomainJoin] Ubuntu - Retrieve and set interface name dynamically #499

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Set interface name dymanically for Ubuntu instances within do_dns_con…
…fig function
  • Loading branch information
jase blennerhassett committed Jan 16, 2023
commit 0995677537da1e70ccbe95cf55a0da2e06eebda4
3 changes: 2 additions & 1 deletion agent/plugins/domainjoin/domainjoin_unix_script.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,12 @@ do_dns_config() {
if [ $LINUX_DISTRO = "UBUNTU" ]; then
if [ -d /etc/netplan ]; then
# Ubuntu 18.04
if_name=$(ip route list | grep default | grep -E 'dev (\w+)' -o | awk '{print $2}')
cat << EOF | tee /etc/netplan/99-custom-dns.yaml
network:
version: 2
ethernets:
eth0:
$if_name:
nameservers:
addresses: [$INPUT_DNS_IP_ADDRESS1, $INPUT_DNS_IP_ADDRESS2]
dhcp4-overrides:
Expand Down