Ignore:
Timestamp:
Jan 27, 2011, 7:31:24 PM (13 years ago)
Author:
Bruno Cornec
Message:

r4180@localhost: bruno | 2011-01-27 10:26:41 +0100

  • Fix multiple port issues from 2.2.9 that prevented mindi to work
  • Change interface of call_program_and_get_last_line_of_output to allow not logging (call to mindi)
  • Status is working boot, but NFS interface broken due to conf file issues
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2644 r2704  
    612612
    613613#ifdef __FreeBSD__
    614         bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'");
     614        bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'",TRUE);
    615615        if (!bootdev[0]) {
    616616            mr_free(bootdev);
    617             bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'");
     617            bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'",TRUE);
    618618        }
    619619#else
    620620        /* Linux */
    621621#ifdef __IA64__
    622         bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'");
     622        bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'",TRUE);
    623623#else
    624         bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'");
     624        bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'",TRUE);
    625625#endif
    626626        if (strstr(bootdev, "/dev/cciss/")) {
    627627            mr_free(bootdev);
    628628#ifdef __IA64__
    629             bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | cut -dp -f1");
     629            bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | cut -dp -f1",TRUE);
    630630#else
    631             bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1");
     631            bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1",TRUE);
    632632#endif
    633633        }
    634634        if (!bootdev[0]) {
    635635            mr_free(bootdev);
    636             bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'");
     636            bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'",TRUE);
    637637            if (strstr(bootdev, "/dev/cciss/")) {
    638638                mr_free(bootdev);
    639                 bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | cut -dp -f1");
     639                bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | cut -dp -f1",TRUE);
    640640            }
    641641        }
     
    840840    if (!res) {
    841841        log_to_screen("Boot+data disks were created OK");
    842         mr_asprintf(command, "cp -f /%s/images/mindi.iso %s/mondorescue.iso", MINDI_CACHE_REL, MINDI_CACHE);
     842        mr_asprintf(command, "cp -f /%s/mindi.iso %s/mondorescue.iso", MINDI_CACHE_REL, MINDI_CACHE);
    843843        log_msg(2, command);
    844844        run_program_and_log_output(command, FALSE);
     
    866866        log_to_screen("Mindi failed to create your boot+data disks.");
    867867        mr_asprintf(command, "grep 'Fatal error' /var/log/mindi.log");
    868         tmp = call_program_and_get_last_line_of_output(command);
     868        tmp = call_program_and_get_last_line_of_output(command,TRUE);
    869869        mr_free(command);
    870870
     
    11251125    mr_asprintf(data_disks_file, "/%s/all.tar.gz", MINDI_CACHE_REL);
    11261126
    1127     g_serial_string = call_program_and_get_last_line_of_output("dd  if=/dev/urandom bs=16 count=1 2> /dev/null |  hexdump | tr -s ' ' '0' | head -n1");
     1127    g_serial_string = call_program_and_get_last_line_of_output("dd  if=/dev/urandom bs=16 count=1 2> /dev/null |  hexdump | tr -s ' ' '0' | head -n1",TRUE);
    11281128    mr_strip_spaces(g_serial_string);
    11291129    mr_strcat(g_serial_string, "...word.");
     
    18111811    mr_asprintf(command, "dd if=%s bs=512 count=1 2> /dev/null | strings | head -n1", bigfile_fname);
    18121812    log_msg(1, "command = '%s'", command);
    1813     tmp = call_program_and_get_last_line_of_output(command);
     1813    tmp = call_program_and_get_last_line_of_output(command,TRUE);
    18141814    mr_free(command);
    18151815
     
    25442544            mr_asprintf(tmp, "cat %s 2> /dev/null", szserfname);
    25452545            mr_free(our_serial_str);
    2546             our_serial_str = call_program_and_get_last_line_of_output(tmp);
     2546            our_serial_str = call_program_and_get_last_line_of_output(tmp,TRUE);
    25472547            mr_free(tmp);
    25482548            // FIXME - should be able to use last_line_of_file(), surely?
     
    27332733        mr_asprintf(command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", biggie_filename);
    27342734        log_it("command = %s", command);
    2735         tmp = call_program_and_get_last_line_of_output(command);
     2735        tmp = call_program_and_get_last_line_of_output(command,TRUE);
    27362736        mr_free(command);
    27372737        log_it("res of it = %s", tmp);
Note: See TracChangeset for help on using the changeset viewer.