|| strcmp(optarg, "on") == 0
|| strcmp(optarg, "no") == 0
|| strcmp(optarg, "off") == 0
+ || strcmp(optarg, "disable") == 0
) {
suspend = strdup(optarg);
break;
printf(clock_mode == CM_UTC ? _("Using UTC time.\n") :
_("Using local time.\n"));
- if (!alarm && !seconds) {
+ if (!alarm && !seconds && strcmp(suspend,"disable")) {
fprintf(stderr, _("%s: must provide wake time\n"), progname);
usage(EXIT_FAILURE);
}
} while (!(data & RTC_AF));
}
+ } else if (strcmp(suspend, "disable") == 0) {
+ /* just break, alarm gets disabled in the end */
+ if (verbose)
+ printf(_("suspend mode: disable; disabling alarm\n"));
} else {
if (verbose)
printf(_("suspend mode: %s; suspending system\n"), suspend);