]> git.proxmox.com Git - pve-container.git/commit
use BEGIN/END markers for gateway scripts
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 13 May 2016 09:10:21 +0000 (11:10 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 23 May 2016 07:11:21 +0000 (09:11 +0200)
commita5d9039e60009c02c12b7b99e8cc529d5bc18272
tree3956ca5810d3406568c3c51da8ef67059644ff62
parent7ab6e832082489233ef0e0512f2074f5d96cd66b
use BEGIN/END markers for gateway scripts

remove_gateway_scripts() for debian containers can easily
match user-created scripts since it's not strict enough,
which now that we always clean up gateways appears to be an
issue for some.

To deal with this we update this portion to also use
BEGIN/END markers like we did with other files. (Note that
this means we explicitly include the BEGIN/END comment lines
in the 'attribute' list while parsing sections.)

In order to not break existing container configurations we
now remove either a begin/end marked section in
remove_gateway_scripts(), or if none was found fall back to
a much stricter variant of the old matching algorithm which
only triggers if the gateway setup lines are complete and
unmodified.
debian/changelog
src/PVE/LXC/Setup/Debian.pm
src/test/test-debian-012/etc/network/interfaces.exp
src/test/test-debian-014/config
src/test/test-debian-014/etc/hosts.exp
src/test/test-debian-014/etc/network/interfaces [new file with mode: 0644]
src/test/test-debian-014/etc/network/interfaces.exp [new file with mode: 0644]