Added hyperv kvp guest services debian scripts
This commit is contained in:
parent
e7a63c9f7e
commit
e1eeda711c
6
Makefile
6
Makefile
@ -116,3 +116,9 @@ install-default-iptables-persistent-rules:
|
||||
cp -vf rules.v4 /etc/iptables/rules.v4
|
||||
cp -vf rules.v6 /etc/iptables/rules.v6
|
||||
|
||||
install-debain-hv-scripts:
|
||||
mkdir -p /usr/libexec/hypervkvpd
|
||||
cp -vf hv_get_dns_info.sh /usr/libexec/hypervkvpd/hv_get_dns_info
|
||||
chmod +x /usr/libexec/hypervkvpd/hv_get_dns_info
|
||||
cp -vf hv_get_dhcp_info.sh /usr/libexec/hypervkvpd/hv_get_dhcp_info
|
||||
chmod +x /usr/libexec/hypervkvpd/hv_get_dhcp_info
|
||||
|
12
hv_get_dhcp_info.sh
Executable file
12
hv_get_dhcp_info.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
INTERFACE_NAME="$1"
|
||||
|
||||
dhcp=$(grep "iface ${INTERFACE_NAME} inet dhcp" /etc/network/interfaces 2>/dev/null)
|
||||
|
||||
if [ "$dhcp" != "" ];
|
||||
then
|
||||
echo "Enabled"
|
||||
else
|
||||
echo "Disabled"
|
||||
fi
|
3
hv_get_dns_info.sh
Executable file
3
hv_get_dns_info.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat /etc/resolv.conf 2>/dev/null | awk '/^nameserver/ { print $2 }'
|
Loading…
Reference in New Issue
Block a user