Ignore:
Timestamp:
Jun 13, 2013, 6:05:57 PM (7 years ago)
Author:
Bruno Cornec
Message:

r5345@localhost: bruno | 2013-06-13 12:46:54 +0200

  • Solving #702 by adding a -F option which is meant to be used especially when mondoarchive is launched from cron, to avoid going into a loop where mondoarchive asks questions to the admin, where they cannot be answerd, which fills the logs and the underlying file system. With -F mondoarchive will exits at the first interaction request instead.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/common/newt-specific.c

    r3114 r3141  
    5555 */
    5656    bool g_exiting = FALSE;
     57
     58// Decide whether we should continue to ask questions or exit (cron use case)
     59extern bool g_fail_immediately;
    5760
    5861/**
     
    125128        char *p;
    126129
    127          assert_string_is_neither_NULL_nor_zerolength(prompt);
    128 
     130        assert_string_is_neither_NULL_nor_zerolength(prompt);
     131
     132        if (g_fail_immediately) {
     133            // We consider the user aborted by using the -F option
     134            log_msg(3, "Exiting at first interaction request due to -F");
     135            finish(1);
     136        }
    129137        if (g_text_mode) {
    130138
     
    179187        int i;
    180188
     189        assert_string_is_neither_NULL_nor_zerolength(prompt);
     190        if (g_fail_immediately) {
     191            // We consider the user aborted by using the -F option
     192            log_msg(3, "Exiting at first interaction request due to -F");
     193            finish(1);
     194        }
    181195        tmp = malloc(MAX_NEWT_COMMENT_LEN);
    182         assert_string_is_neither_NULL_nor_zerolength(prompt);
    183196        if (g_text_mode) {
    184197            paranoid_system("sync");
Note: See TracChangeset for help on using the changeset viewer.