c93dfeec7f
IP address is passed as a kernel boot param when booting undercloud machine. For Fedora 19, this IP is not set, instead IP is fetched from DHCP. The problem is caused by a bug in dracut-network version 029, which causes that dracut network setup script is not executed properly. This patch applies a fix for the bug when building undercloud image. Fixes: bug #1213833 Change-Id: Ie94a86ed716044343791628973143c1a7d0778dc
16 lines
724 B
Bash
Executable file
16 lines
724 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# If the patch doesn't apply just do nothing. This patch fixes a small
|
|
# issue in the script that writes the network configuration files from
|
|
# the cmdline to the disk on FC18/FC19.
|
|
#
|
|
#for dracut-network 029 we need a different patch:
|
|
# http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=613ed5cd764d54cac082a1e7b7e8d1f1fed29d35
|
|
IFCFG_FILE="/usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh"
|
|
NETGEN_FILE="/usr/lib/dracut/modules.d/40network/net-genrules.sh"
|
|
|
|
if patch --dry-run $NETGEN_FILE < $(dirname $0)/../dracut-029-netgen.patch > /dev/null; then
|
|
patch $NETGEN_FILE < $(dirname $0)/../dracut-029-netgen.patch || true
|
|
else
|
|
patch $IFCFG_FILE < $(dirname $0)/../dracut-write-ifcfg.patch || true
|
|
fi
|