From 88ccab22e0af7ffe4c2ffa9a01e39e5f6f693722 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 10 Oct 2014 17:46:02 +0100 Subject: [PATCH] RHEL 7: Revert "appliance: Use dhclient or dhcpcd instead of hard-coding IP address of appliance." This reverts commit 67e6f32a240c7c234e6af637c1cd324b36a82cd3. --- appliance/init | 15 ++++++--------- appliance/packagelist.in | 7 ------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/appliance/init b/appliance/init index f530ad3d5..1cd264e08 100755 --- a/appliance/init +++ b/appliance/init @@ -120,15 +120,12 @@ shopt -u nullglob ip addr add 127.0.0.1/8 brd + dev lo scope host ip link set dev lo up -if test "$guestfs_network" = 1; then - iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf) - touch /etc/fstab # Workaround for Ubuntu. - if dhclient --version >/dev/null 2>&1; then - dhclient $iface - else - dhcpcd $iface - fi -fi +ip addr add 169.254.2.10/16 brd + dev eth0 scope global +ip link set dev eth0 up + +ip route add default via 169.254.2.2 + +echo nameserver 169.254.2.3 > /etc/resolv.conf # Scan for MDs but don't run arrays unless all expected drives are present mdadm -As --auto=yes --no-degraded diff --git a/appliance/packagelist.in b/appliance/packagelist.in index 81a8f0dba..1e7d53481 100644 --- a/appliance/packagelist.in +++ b/appliance/packagelist.in @@ -26,7 +26,6 @@ ifelse(REDHAT,1, augeas-libs cryptsetup cryptsetup-luks dnl old name used before Fedora 17 - dhclient genisoimage gfs-utils gfs2-utils @@ -76,7 +75,6 @@ dnl iproute has been renamed to iproute2 iputils-ping iputils-arping iputils-tracepath - isc-dhcp-client ldmtool libaugeas0 libc-bin @@ -110,7 +108,6 @@ ifelse(ARCHLINUX,1, cdrkit cdrtools cryptsetup - dhclient grub hivex iproute2 @@ -141,8 +138,6 @@ ifelse(SUSE,1, btrfsprogs cdrkit-cdrtools-compat cryptsetup - dhcpcd - dhcp-client genisoimage glibc-locale gptfdisk @@ -171,7 +166,6 @@ ifelse(FRUGALWARE,1, augeas cryptsetup-luks cdrkit - dhclient grub2 hfsplus iproute2 @@ -199,7 +193,6 @@ ifelse(MAGEIA,1, chkconfig /* for /etc/init.d */ cdrkit-genisoimage cdrkit-isotools - dhclient extlinux gfs2-utils grub -- 2.17.1