]> git.proxmox.com Git - pve-container.git/commit
Setup::Base: more generic ct_modify_file function
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 1 Mar 2016 09:50:32 +0000 (10:50 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 7 Mar 2016 08:31:27 +0000 (09:31 +0100)
commit2edb50e57bc7866aa24dacbe1197a87414a851e3
tree50e3a59ab5ded487052512c31c85a1eb8b42a71e
parent52eb76e5eba94e28f4de52cbfbf3f3f5c7f7f8e2
Setup::Base: more generic ct_modify_file function

Replaced ct_modify_file_head_portion() with ct_modify_file()
taking a header and and replacing the section in-place
rather than always moving it to the top of the file.

The behavior for when a section is not defined can be
defined via the provided options (replace, prepend, or
append).
12 files changed:
src/PVE/LXC/Setup/Base.pm
src/PVE/LXC/Setup/Redhat.pm
src/PVE/LXC/Setup/SUSE.pm
src/test/test-centos6-001/etc/resolv.conf.exp
src/test/test-debian-007/etc/resolv.conf [new file with mode: 0644]
src/test/test-debian-007/etc/resolv.conf.exp
src/test/test-debian-008/etc/resolv.conf [new file with mode: 0644]
src/test/test-debian-008/etc/resolv.conf.exp
src/test/test-opensuse-001/etc/resolv.conf.exp
src/test/test-opensuse-001/etc/sysconfig/network/ifroute-eth0.exp
src/test/test-opensuse-002/etc/sysconfig/network/ifroute-eth0.exp
src/test/test-opensuse-003/etc/sysconfig/network/ifroute-eth0.exp