While converting a user provisioning tool from use in linux to FreeBSD it turned out crontab -r was interactive (requiring 'y' to remove). This diff adds a '-f' option to force crontab to be non-interactive.
Details
- Reviewers
cem - Group Reviewers
manpages - Commits
- rS310329: Add a 'force' option for non-interactive crontab removal
Tested by adding a test user, creating a crontab for them and attempting to remove it with a without '-f' set.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Please upload a diff with full context (either use the arc tool, or generate a patch with diff -U9999999).
usr.sbin/cron/crontab/crontab.c | ||
---|---|---|
66 | Spacing between 'int' and 'fflag' looks off relative to other variables nearby. |
Do you have a commit bit, or do you need me to commit this for you? Thanks!
usr.sbin/cron/crontab/crontab.1 | ||
---|---|---|
20 | In general, bump .Dd to the date you changed the manual page. | |
usr.sbin/cron/crontab/crontab.c | ||
289 | I see. You could also workaround this by running crontab ... < /dev/null. I still like your -f flag, though. |
Fixed date in manpage and no I don't have a bit -- if you could commit that would be great.
usr.sbin/cron/crontab/crontab.c | ||
---|---|---|
289 | Yeah we were piping in yes but it wasn't until I got into the code I saw there was some way to make it non-interactive, but it's undocumented. |