diskimage-builder/elements/dracut-network/install.d/11-patch-dracut
Gonéri Le Bouder ea3f4dd459 4 spaces indent
ensure 4 spaces indentation is used everywhere.

Change-Id: Ieb48faacb4c96b7b358771d70c17f2f22d0354f4
2014-05-10 11:17:29 +02:00

20 lines
755 B
Bash
Executable File

#!/bin/bash
set -eu
set -o pipefail
# 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