Fix adding multiple IPs for Debian/Ubuntu

It's a long long story.

First, commit 575b0d6e580f3cf2c6a8bf627d5ffd8dc6474968
fixed debian-add_ip.sh script which was rewriting
/etc/network/interfaces each time on adding a new IP
because of incorrect regex in line 104. Before this
commit, the code was looking for a line containing
'^auto venet0$', after the commit it looks for
'^auto venet0 ' (note the ending space). Since the actual
line was like 'auto venet0 lo' it was a correct fix.

Then, commit 7b139a9e87b0e37c2d4c0c6e7088475657d6ff5c
changed the line to be 'auto venet0 ' (with the space
at the end of line) and left the regex as it, so it
still worked fine, the only problem was this space
(which, with the help of previous commit, is required)
now became invisible. A call to trouble.

Finally, commit 673cf0450e9c285cbd1931073edcb3a291d660a8
removed ending spaces from all the code, including the
space discussed above. Thus, regex '^auto venet0 ' stopped
working.

Fixed here by using the more sophisticated regex:
now we require that there should be no ':' right after
'venet0', so it can be with or without space.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed