Red Hat Bugzilla – Bug 488916
0anacron unary operator expected
Last modified: 2009-03-06 03:27:49 EST
Description of problem:
There's a syntax error in /etc/cron.hourly/0anacron that causes the script to only send an email with the subject error in it.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. make sure anacron and cronie are installed
2. read mail at the top of every hour
/etc/cron.hourly/0anacron: line 3: [: 20090306: unary operator expected
(The date varies, of course.)
No email. The script should run without generating a syntax error message.
This bug was reported as Bug 486156 (closed as a duplicate of Bug 252254) and resolved as part of Bug 252254 as "Fixed in anacron-2.3-70," but it isn't resolved as of anacron-2.3-71.fc11.
The suggested patch from Bug 252254 was:
--- 0anacron.orig 2009-02-10 03:00:15.000000000 -0700
+++ 0anacron 2009-02-16 08:53:55.000000000 -0700
@@ -1,6 +1,6 @@
-if [ `date +%Y%m%d` = $day ]; then
+if [ `date +%Y%m%d` = "$day" ]; then
Ok, this somehow didn't go to cvs. This should be fixed in anacron-2.3-72. (I check the file after build for be 100% sure).
Please feel free to reopen it, if there will be any other troubles.