]> git.proxmox.com Git - pve-container.git/commitdiff
regex cleanup
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 6 Apr 2016 12:32:38 +0000 (14:32 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 6 Apr 2016 14:44:04 +0000 (16:44 +0200)
src/PVE/LXC/Setup/Base.pm

index e8263af3703a1b52d08f6e7c442f4b380540a6f6..9f21d6f5c979af8491d3c1a225a57351e1c3736c 100644 (file)
@@ -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;