~ubuntu-branches/debian/sid/vzctl/sid

« back to all changes in this revision

Viewing changes to etc/dists/scripts/gentoo-add_ip.sh

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2011-10-17 06:51:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20111017065128-vgdwvq5lei9g4mc7
Tags: 3.0.29.3-1
New upstream release.
Closes: #638072.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
 
90
90
function add_ip()
91
91
{
92
 
        local ip
 
92
        local ipm
93
93
        if [ "x${VE_STATE}" = "xstarting" -o "x${IPDELALL}" = "xyes" ]; then
94
94
                init_netconfig
95
95
                if [ "x${IPDELALL}" = "xyes" ]; then
98
98
                fi
99
99
        fi
100
100
 
101
 
        for ip in ${IP_ADDR}; do
102
 
                if [ "${ip#*:}" = "$ip" ]; then nm=32; else nm=0; fi
103
 
                if ! grep -qw "config_${VENET_DEV}=\(.*\"${ip}[\"\/].*\)" ${IFCFG}; then
 
101
        for ipm in ${IP_ADDR}; do
 
102
                ip_conv $ipm
 
103
                if ! grep -qw "config_${VENET_DEV}=\(.*\"${_IP}[\"\/].*\)" ${IFCFG}; then
104
104
                        if ! is_baselayout1 ; then
105
 
                                add_param "${IFCFG}" "config_${VENET_DEV}" "${ip}/${nm}"
 
105
                                add_param "${IFCFG}" "config_${VENET_DEV}" "${_IP}/${_MASK}"
106
106
                        else
107
 
                                add_param3 "${IFCFG}" "config_${VENET_DEV}" "${ip}/${nm}"
 
107
                                add_param3 "${IFCFG}" "config_${VENET_DEV}" "${_IP}/${_MASK}"
108
108
                        fi
109
109
                fi
110
110
        done