[pve-devel] [PATCH pve-zsync 2/2] parse cron: handle additional whitespace

Fabian Ebner f.ebner at proxmox.com
Mon Feb 21 10:07:50 CET 2022


Can only happen by manually editing AFAICT, but cron does execute the
jobs, so just be a bit less restrictive when parsing.

Reported in the community forum:
https://forum.proxmox.com/threads/105254/

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 pve-zsync | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pve-zsync b/pve-zsync
index 7246336..f69e126 100755
--- a/pve-zsync
+++ b/pve-zsync
@@ -308,8 +308,7 @@ sub parse_cron {
     my $cfg = {};
 
     while (my $line = shift(@text)) {
-
-	my @arg = split('\s', $line);
+	my @arg = split('\s+', $line);
 	my $param = parse_argv(@arg);
 
 	if ($param->{source} && $param->{dest}) {
-- 
2.30.2






More information about the pve-devel mailing list