#275 closed defect (fixed)
cronload should error when run without arguments
Reported by: | adehnert | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | cron | Keywords: | starter, shell |
Cc: |
Description
At the moment, if you run cronload with no arguments, it'll give you an error message from cat, and wipe your crontab:
[asa@cats-whiskers]:~/Scripts/django/db2.0/asadb$ cronload /bin/cat: : No such file or directory New crontab for asa: [asa@cats-whiskers]:~/Scripts/django/db2.0/asadb$
Instead, it should give you a nice error message and not touch your crontab, or something.
Attachments (2)
Change History (8)
comment:1 Changed 13 years ago by adehnert
- Keywords starter shell added
comment:2 Changed 12 years ago by btidor
comment:3 Changed 12 years ago by andersk
The cronload you ran from the locker is actually a wrapper script around the cronload you get while logged into scripts. This bug is about the latter, and it looks like it still exists.
Changed 12 years ago by btidor
comment:4 Changed 12 years ago by btidor
Also occurs if the named cronfile does not exist. Fixed; see patch.
comment:5 Changed 12 years ago by andersk
The message should be printed to stderr, and the exit status in these cases should be nonzero.
Changed 12 years ago by btidor
comment:6 Changed 12 years ago by ezyang
- Resolution set to fixed
- Status changed from new to closed
Committed in r2313, thanks for the patch! (For future reference, it's good to have the svn diff be from the root directory of the repo, so that the filename is identified; there are three files named cronload in our repo!)
Works for me...