Since -e and -r are right next to each other prompt before clobbering

a crontab you were planning to edit.
This commit is contained in:
Paul Richards 2000-10-15 00:35:34 +00:00
parent e0284d2eb1
commit 30cfb24129
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67127

View File

@ -248,6 +248,16 @@ list_cmd() {
static void
delete_cmd() {
char n[MAX_FNAME];
int ch, first;
if (isatty(STDIN_FILENO)) {
(void)fprintf(stderr, "remove crontab for %s? ", User);
first = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (first != 'y' && first != 'Y')
return;
}
log_it(RealUser, Pid, "DELETE", User);
(void) sprintf(n, CRON_TAB(User));