Ignore:
Timestamp:
Feb 2, 2007, 11:31:00 PM (17 years ago)
Author:
Bruno Cornec
Message:

WARNING: Not tested yet ! Will be stabilized in next hours.
this patch changes the interface between mindi and mondo.
Everything is now managed through either MONDO_CACHE/mondo-restore.cfg
and MONDO_CACHE/mindi.conf (an additional configuration file)
This removes all the one line files NFS-*, ... that where used
in an anarchic way. Now everything computed by mondo is
under mondo-restore.cfg and everything related to mindi in mindi.conf

Still needed are the removal of the 2 parameters to mindi,
but that will be done after when a clear line is drawn between
where files are put by each tool.

MONDO_TMP and MINDI_TMP should be reserved for temporary files
MONDO_CACHE and MINDI_CACHE for end results and communication
between tools.
These changes were made in order to prepare the USB support in mondo

A first step in the right direction, but still some work to do
before it's working again.
Testers please be warned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-files.c

    r1080 r1087  
    2020#include "libmondo-fork-EXT.h"
    2121#include "libmondo-string-EXT.h"
     22
     23#include "mr_file.h"
    2224
    2325/*@unused@*/
     
    11571159    char command[MAX_STR_LEN * 2];
    11581160
     1161    FILE *fd1 = NULL;
     1162
    11591163    /*@ pointers ***** */
    11601164    char *p;
     
    12181222    }
    12191223
    1220     sprintf(tmp, "%s/NFS-DEV", bkpinfo->tmpdir);
    1221     write_one_liner_data_file(tmp, nfs_dev);
    1222 
    1223     sprintf(tmp, "%s/NFS-CLIENT-IPADDR", bkpinfo->tmpdir);
    1224     write_one_liner_data_file(tmp, nfs_client_ipaddr);
    1225     sprintf(tmp, "%s/NFS-CLIENT-NETMASK", bkpinfo->tmpdir);
    1226     write_one_liner_data_file(tmp, nfs_client_netmask);
    1227     sprintf(tmp, "%s/NFS-CLIENT-BROADCAST", bkpinfo->tmpdir);
    1228     write_one_liner_data_file(tmp, nfs_client_broadcast);
    1229     sprintf(tmp, "%s/NFS-CLIENT-DEFGW", bkpinfo->tmpdir);
    1230     write_one_liner_data_file(tmp, nfs_client_defgw);
    1231     sprintf(tmp, "%s/NFS-SERVER-IPADDR", bkpinfo->tmpdir);
    1232     write_one_liner_data_file(tmp, nfs_server_ipaddr);
    1233     sprintf(tmp, "%s/NFS-SERVER-MOUNT", bkpinfo->tmpdir);
    1234     write_one_liner_data_file(tmp, bkpinfo->nfs_mount);
    1235     sprintf(tmp, "%s/NFS-SERVER-PATH", bkpinfo->tmpdir);
    1236     write_one_liner_data_file(tmp, bkpinfo->nfs_remote_dir);
    1237     sprintf(tmp, "%s/ISO-PREFIX", bkpinfo->tmpdir);
    1238     write_one_liner_data_file(tmp, bkpinfo->prefix);
     1224    fd1 = mr_fopen(MONDORESTORECFG, "a");
     1225
     1226    mr_fprintf(fd1, "nfs-dev %s\n", nfs_dev);
     1227    mr_fprintf(fd1, "nfs-client-ipaddr %s\n", nfs_client_ipaddr);
     1228    mr_fprintf(fd1, "nfs-client-netmask %s\n", nfs_client_netmask);
     1229    mr_fprintf(fd1, "nfs-client-broadcast %s\n", nfs_client_broadcast);
     1230    mr_fprintf(fd1, "nfs-client-defgw %s\n", nfs_client_defgw);
     1231    mr_fprintf(fd1, "nfs-server-ipaddr %s\n", nfs_server_ipaddr);
     1232    mr_fprintf(fd1, "nfs-server-mount %s\n", bkpinfo->nfs_mount);
     1233    mr_fprintf(fd1, "nfs-server-path %s\n", bkpinfo->nfs_remote_dir);
     1234    mr_fprintf(fd1, "iso-prefix %s\n", bkpinfo->prefix);
     1235    mr_flcose(fd1);
     1236
    12391237    log_it("Finished storing NFS configuration");
    12401238}
Note: See TracChangeset for help on using the changeset viewer.