diff options
| author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-09-01 10:23:57 +0000 |
|---|---|---|
| committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-09-01 10:23:57 +0000 |
| commit | 810cc328c485a1afcca608bd8cc2b4fd0824d2b2 (patch) | |
| tree | ef98f8bb5478276a0a5cb15d127ae79fba8f1dea /miscutils | |
| parent | 56c58a5402dce20c09b5bc0d8006f34b62dbc932 (diff) | |
| download | busybox-w32-810cc328c485a1afcca608bd8cc2b4fd0824d2b2.tar.gz busybox-w32-810cc328c485a1afcca608bd8cc2b4fd0824d2b2.tar.bz2 busybox-w32-810cc328c485a1afcca608bd8cc2b4fd0824d2b2.zip | |
According to bug #63, crond is unhappy with crontab lines that don't end in a
newline, or lines that have trailing spaces.
git-svn-id: svn://busybox.net/trunk/busybox@11310 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'miscutils')
| -rw-r--r-- | miscutils/crond.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c index 085cf6e9d..53c255fef 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
| @@ -589,10 +589,8 @@ static void SynchronizeFile(const char *fileName) | |||
| 589 | CronLine line; | 589 | CronLine line; |
| 590 | char *ptr; | 590 | char *ptr; |
| 591 | 591 | ||
| 592 | if (buf[0]) { | 592 | trim(buf); |
| 593 | buf[strlen(buf) - 1] = 0; | 593 | if (buf[0] == 0 || buf[0] == '#') { |
| 594 | } | ||
| 595 | if (buf[0] == 0 || buf[0] == '#' || buf[0] == ' ' || buf[0] == '\t') { | ||
| 596 | continue; | 594 | continue; |
| 597 | } | 595 | } |
| 598 | if (--maxEntries == 0) { | 596 | if (--maxEntries == 0) { |
