~ubuntu-branches/ubuntu/lucid/vzctl/lucid

« back to all changes in this revision

Viewing changes to etc/dists/scripts/debian-del_ip.sh

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2007-04-10 18:08:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070410180816-0uuzj9fnna7gmzxv
Tags: 3.0.16-4
Etch has been released which means that this version can be uploaded
to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
 
#  Copyright (C) 2000-2006 SWsoft. All rights reserved.
 
2
#  Copyright (C) 2000-2007 SWsoft. All rights reserved.
3
3
#
4
4
#  This program is free software; you can redistribute it and/or modify
5
5
#  it under the terms of the GNU General Public License as published by
35
35
        local ip
36
36
 
37
37
        for ip in ${IP_ADDR}; do
38
 
                ifname=`grep -B 1 -e "\\<${ip}\\>" ${CFGFILE} | \
 
38
                ifname=`grep -B 1 -w "${ip}" ${CFGFILE} | \
39
39
                        grep "${VENET_DEV}:" | cut -d' ' -f2`
40
40
                if [ -n "${ifname}" ]; then
41
 
                        ifdown ${ifname}
42
 
                        echo "/\\<${ip}\\>
43
 
-2,+2d
44
 
wq" | ed ${CFGFILE} >/dev/null 2>&1 
 
41
                        ifdown "${ifname}" 2>/dev/null
 
42
                        remove_debian_interface "${ifname}" ${CFGFILE}
45
43
                fi
46
44
        done
47
45
}