Ignore:
Timestamp:
Feb 7, 2007, 11:55:11 PM (13 years ago)
Author:
bruno
Message:

merge -r1082:1105 $SVN_M/branches/stable

File:
1 edited

Legend:

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

    r1086 r1106  
    1919#include "libmondo-string-EXT.h"
    2020#include "mr_mem.h"
     21
     22#include "mr_file.h"
    2123
    2224/*@unused@*/
     
    10441046    char *command = NULL;
    10451047
     1048    FILE *fd1 = NULL;
     1049
    10461050    /*@ pointers ***** */
    10471051    char *p;
     
    10961100            ("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified.");
    10971101    }
    1098     make_hole_for_dir("/var/cache/mondo-archive");
    10991102    /********
    11001103    * If the NFS device that found above is a bonded device,
     
    11211124    }
    11221125
    1123     mr_asprintf(&tmp, "%s/NFS-DEV", bkpinfo->tmpdir);
    1124     write_one_liner_data_file(tmp, nfs_dev);
    11251126    mr_free(nfs_dev);
    11261127    mr_free(tmp);
    11271128
    1128     mr_asprintf(&tmp, "%s/NFS-CLIENT-IPADDR", bkpinfo->tmpdir);
    1129     write_one_liner_data_file(tmp, nfs_client_ipaddr);
    1130     mr_free(nfs_client_ipaddr);
    1131     mr_free(tmp);
    1132 
    1133     mr_asprintf(&tmp, "%s/NFS-CLIENT-NETMASK", bkpinfo->tmpdir);
    1134     write_one_liner_data_file(tmp, nfs_client_netmask);
    1135     mr_free(nfs_client_netmask);
    1136     mr_free(tmp);
    1137 
    1138     mr_asprintf(&tmp, "%s/NFS-CLIENT-DEFGW", bkpinfo->tmpdir);
    1139     write_one_liner_data_file(tmp, nfs_client_defgw);
    1140     mr_free(nfs_client_defgw);
    1141     mr_free(tmp);
    1142 
    1143     mr_asprintf(&tmp, "%s/NFS-CLIENT-BROADCAST", bkpinfo->tmpdir);
    1144     write_one_liner_data_file(tmp, nfs_client_broadcast);
    1145     mr_free(nfs_client_broadcast);
    1146     mr_free(tmp);
    1147 
    1148     mr_asprintf(&tmp, "%s/NFS-SERVER-IPADDR", bkpinfo->tmpdir);
    1149     write_one_liner_data_file(tmp, nfs_server_ipaddr);
    1150     mr_free(nfs_server_ipaddr);
    1151     mr_free(tmp);
    1152 
    1153     mr_asprintf(&tmp, "%s/NFS-SERVER-MOUNT", bkpinfo->tmpdir);
    1154     write_one_liner_data_file(tmp, bkpinfo->nfs_mount);
    1155     mr_free(tmp);
    1156 
    1157     mr_asprintf(&tmp, "%s/NFS-SERVER-PATH", bkpinfo->tmpdir);
    1158     write_one_liner_data_file(tmp, bkpinfo->nfs_remote_dir);
    1159     mr_free(tmp);
    1160 
    1161     mr_asprintf(&tmp, "%s/ISO-PREFIX", bkpinfo->tmpdir);
    1162     write_one_liner_data_file(tmp, bkpinfo->prefix);
    1163     mr_free(tmp);
     1129    fd1 = mr_fopen(MONDORESTORECFG, "a");
     1130    mr_fprintf(fd1, "nfs-dev %s\n", nfs_dev);
     1131    mr_fprintf(fd1, "nfs-client-ipaddr %s\n", nfs_client_ipaddr);
     1132    mr_fprintf(fd1, "nfs-client-netmask %s\n", nfs_client_netmask);
     1133    mr_fprintf(fd1, "nfs-client-broadcast %s\n", nfs_client_broadcast);
     1134    mr_fprintf(fd1, "nfs-client-defgw %s\n", nfs_client_defgw);
     1135    mr_fprintf(fd1, "nfs-server-ipaddr %s\n", nfs_server_ipaddr);
     1136    mr_fprintf(fd1, "nfs-server-mount %s\n", bkpinfo->nfs_mount);
     1137    mr_fprintf(fd1, "nfs-server-path %s\n", bkpinfo->nfs_remote_dir);
     1138    mr_fprintf(fd1, "iso-prefix %s\n", bkpinfo->prefix);
     1139    mr_fclose(fd1);
    11641140
    11651141    log_it("Finished storing NFS configuration");
Note: See TracChangeset for help on using the changeset viewer.