diff options
Diffstat (limited to 'sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch')
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch b/sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch new file mode 100644 index 000000000000..7184feefbd0b --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.22-workaround-gentoo-add_ip.patch @@ -0,0 +1,31 @@ +From: Daniel Robbins <drobbins@funtoo.org> +Date: Thu, 13 Mar 2008 07:17:31 +0000 (+0300) +Subject: gentoo-add_ip.sh: fix the case then config_venet0 is commented out +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=fa72a4fdc14db95b24cfb757f6506e89ad2268df + +gentoo-add_ip.sh: fix the case then config_venet0 is commented out + +I had some config entries commented out in /etc/conf.d/net which +caused the add ip script (/etc/vz/dists/scripts/gentoo-add_ip.sh) to +fail. I fixed this by adding a "^" to the beginning of the grep -qw +command, as below.... + +There are still other potential problems with parsing the scripts in +the way you do, but this at least will deal with the situation where +someone has commented-out config_venet0 lines in their +/etc/conf.d/net. +--- + +diff --git a/etc/dists/scripts/gentoo-add_ip.sh b/etc/dists/scripts/gentoo-add_ip.sh +index f660da3..b5dfd27 100755 +--- a/etc/dists/scripts/gentoo-add_ip.sh ++++ b/etc/dists/scripts/gentoo-add_ip.sh +@@ -71,7 +71,7 @@ function add_ip() + fi + + for ip in ${IP_ADDR}; do +- grep -qw "config_${VENET_DEV}=\(.*\"${ip}[\"\/].*\)" ${IFCFG} || ++ grep -qw "^config_${VENET_DEV}=\(.*\"${ip}[\"\/].*\)" ${IFCFG} || + add_param3 "${IFCFG}" "config_${VENET_DEV}" "${ip}/32" + done + |