[2202] | 1 | #include <stdio.h>
|
---|
| 2 | #include "my-stuff.h"
|
---|
| 3 | #include "../common/mondostructures.h"
|
---|
| 4 | #include "../common/libmondo.h"
|
---|
| 5 | #include "../mondorestore/mondorestore.h"
|
---|
[2204] | 6 | #include "../mondorestore/mr-externs.h"
|
---|
[2202] | 7 |
|
---|
| 8 | extern void twenty_seconds_til_yikes(void);
|
---|
| 9 |
|
---|
| 10 | /* Reference to global bkpinfo */
|
---|
| 11 | struct s_bkpinfo *bkpinfo;
|
---|
| 12 |
|
---|
| 13 | extern bool g_text_mode;
|
---|
| 14 | extern FILE *g_fprep;
|
---|
| 15 | extern double g_kernel_version;
|
---|
| 16 | extern int g_partition_table_locked_up;
|
---|
| 17 | extern int g_noof_rows;
|
---|
| 18 |
|
---|
| 19 | bool g_ISO_restore_mode = FALSE; /* are we in Iso Mode? */
|
---|
| 20 | bool g_I_have_just_nuked = FALSE;
|
---|
| 21 | char *g_isodir_device;
|
---|
| 22 | char *g_isodir_format;
|
---|
| 23 | char *g_biggielist_txt;
|
---|
| 24 | char *g_filelist_full;
|
---|
| 25 | char *g_filelist_imagedevs;
|
---|
| 26 | char *g_imagedevs_restthese;
|
---|
| 27 |
|
---|
| 28 | char *g_mondo_cfg_file;
|
---|
| 29 |
|
---|
| 30 | char *g_mountlist_fname;
|
---|
| 31 | char *g_mondo_home;
|
---|
| 32 |
|
---|
| 33 | char *g_getfacl;
|
---|
| 34 | char *g_getfattr;
|
---|
| 35 |
|
---|
| 36 | extern char *MONDO_LOGFILE;
|
---|
| 37 | extern int copy_from_src_to_dest(FILE * f_orig, FILE * f_archived,
|
---|
| 38 | char direction);
|
---|
| 39 |
|
---|
| 40 | void main() {
|
---|
| 41 |
|
---|
| 42 | struct mountlist_itself *mountlist = NULL;
|
---|
[2204] | 43 | struct raidlist_itself *raidlist;
|
---|
| 44 |
|
---|
[2202] | 45 | asprintf(&MONDO_LOGFILE,"/tmp/mrtest-mountlist.log");
|
---|
| 46 |
|
---|
| 47 | g_loglevel = 99;
|
---|
| 48 | g_text_mode = FALSE;
|
---|
| 49 | if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) {
|
---|
| 50 | fatal_error("Cannot malloc mountlist");
|
---|
| 51 | }
|
---|
[2204] | 52 | if (!(raidlist = malloc(sizeof(struct raidlist_itself)))) {
|
---|
| 53 | fatal_error("Cannot malloc raidlist");
|
---|
| 54 | }
|
---|
[2202] | 55 | malloc_libmondo_global_strings();
|
---|
| 56 |
|
---|
| 57 | setup_newt_stuff();
|
---|
| 58 | asprintf(&g_mountlist_fname, "/tmp/mountlist.txt");
|
---|
| 59 | load_mountlist(mountlist, g_mountlist_fname);
|
---|
[2204] | 60 | resize_mountlist_proportionately_to_suit_new_drives(mountlist);
|
---|
| 61 | load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
|
---|
| 62 | edit_mountlist(g_mountlist_fname, mountlist, raidlist);
|
---|
| 63 | exit(0);
|
---|
[2202] | 64 | }
|
---|