Removed DNS and hostname hooks (handled by the initrd).
This commit is contained in:
parent
1ffa6757fd
commit
70552c5dbd
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
interface=$1
|
|
||||||
action=$2
|
|
||||||
|
|
||||||
if [ "$interface" = "eth0" -a "$action" = "up" ]
|
|
||||||
then
|
|
||||||
rm -f /etc/resolv.conf
|
|
||||||
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
|
||||||
fi
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
interface=$1
|
|
||||||
action=$2
|
|
||||||
|
|
||||||
if [ "$interface" = "eth0" -a "$action" = "up" ]
|
|
||||||
then
|
|
||||||
metadata_host_name=$(/usr/local/bin/oc-metadata --cached HOSTNAME)
|
|
||||||
if [ "x$metadata_host_name" != "x" ]
|
|
||||||
then
|
|
||||||
echo $metadata_host_name > /etc/hostname
|
|
||||||
sed "/^127.0.1.1[ \t].*$/ s/.*$/127.0.1.1\t$metadata_host_name/" -i /etc/hosts
|
|
||||||
sed "/^127.0.0.1[ \t]localhost/ s/localhost.*$/localhost $metadata_host_name/" -i /etc/hosts
|
|
||||||
hostnamectl set-hostname $metadata_host_name
|
|
||||||
fi
|
|
||||||
fi
|
|
Loading…
Reference in New Issue