From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-zsync 2/2] parse cron: handle additional whitespace
Date: Mon, 21 Feb 2022 10:07:50 +0100 [thread overview]
Message-ID: <20220221090750.17598-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20220221090750.17598-1-f.ebner@proxmox.com>
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@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
next prev parent reply other threads:[~2022-02-21 9:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 9:07 [pve-devel] [PATCH pve-zsync 1/2] rename encode_cron to parse_cron Fabian Ebner
2022-02-21 9:07 ` Fabian Ebner [this message]
2022-02-21 15:05 ` [pve-devel] [PATCH pve-zsync 2/2] parse cron: handle additional whitespace Thomas Lamprecht
2022-02-21 15:06 ` [pve-devel] applied: [PATCH pve-zsync 1/2] rename encode_cron to parse_cron Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220221090750.17598-2-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox