[pve-devel] [PATCH container 2/3] regex cleanup

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Apr 6 14:32:38 CEST 2016


---
 src/PVE/LXC/Setup/Base.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Setup/Base.pm b/src/PVE/LXC/Setup/Base.pm
index e8263af..9f21d6f 100644
--- a/src/PVE/LXC/Setup/Base.pm
+++ b/src/PVE/LXC/Setup/Base.pm
@@ -551,7 +551,7 @@ sub ct_modify_file {
     my $head = "# --- BEGIN PVE ---\n";
     my $tail = "# --- END PVE ---\n";
     my $perms = $options{perms};
-    $data .= "\n" if $data && $data !~ m/.*?\n$/;
+    $data .= "\n" if $data && $data !~ /\n$/;
 
     if (!$self->ct_file_exists($file)) {
 	$self->ct_file_set_contents($file, $head.$data.$tail, $perms) if $data;
-- 
2.1.4





More information about the pve-devel mailing list