2013-11-07 04:25:34 +00:00
|
|
|
#!/bin/bash
|
2013-06-05 13:17:59 +00:00
|
|
|
|
2014-03-29 03:28:22 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
2013-08-16 12:58:39 +00:00
|
|
|
# If the patch doesn't apply just do nothing. This patch fixes a small
|
2013-06-05 13:17:59 +00:00
|
|
|
# issue in the script that writes the network configuration files from
|
2013-08-16 12:58:39 +00:00
|
|
|
# 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
|
2014-05-02 17:02:38 +00:00
|
|
|
patch $NETGEN_FILE < $(dirname $0)/../dracut-029-netgen.patch || true
|
2013-08-16 12:58:39 +00:00
|
|
|
else
|
2014-05-02 17:02:38 +00:00
|
|
|
patch $IFCFG_FILE < $(dirname $0)/../dracut-write-ifcfg.patch || true
|
2013-08-16 12:58:39 +00:00
|
|
|
fi
|