From e2d8231c9ba4ac839f303b7e44f135506c4098fa 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 a36d52b..ff8f5df 100755 --- a/appliance/init +++ b/appliance/init @@ -109,15 +109,12 @@ eval `grep -Eo 'guestfs_channel=[^[:space:]]+' /proc/cmdline` 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. mdadm -As --auto=yes --run diff --git a/appliance/packagelist.in b/appliance/packagelist.in index 306b920..e93e5e8 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 @@ -72,7 +71,6 @@ dnl iproute has been renamed to iproute2 iputils-ping iputils-arping iputils-tracepath - isc-dhcp-client libaugeas0 libc-bin libcap2 @@ -102,7 +100,6 @@ ifelse(ARCHLINUX,1, augeas cdrkit cryptsetup - dhclient grub hivex iproute2 @@ -131,8 +128,6 @@ ifelse(SUSE,1, augeas-lenses btrfsprogs cryptsetup - dhcpcd - dhcp-client genisoimage glibc-locale gptfdisk @@ -156,7 +151,6 @@ ifelse(FRUGALWARE,1, augeas cryptsetup-luks cdrkit - dhclient grub2 hfsplus iproute2 @@ -183,7 +177,6 @@ ifelse(MAGEIA,1, chkconfig /* for /etc/init.d */ cdrkit-genisoimage cdrkit-isotools - dhclient extlinux gfs2-utils grub -- 2.7.4