Changeset 1654


Ignore:
Timestamp:
Sep 24, 2007, 2:13:24 PM (12 years ago)
Author:
bruno
Message:

mkdtemp checked in configure
Fix bugs insetup_tmpdir

Location:
branches/2.2.5/mondo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/configure.in

    r1636 r1654  
    118118AC_TYPE_SIGNAL
    119119AC_FUNC_VPRINTF
    120 AC_CHECK_FUNCS([bzero getcwd memmove memset mkdir mkfifo setenv strcasecmp strchr strerror strrchr strstr])
     120AC_CHECK_FUNCS([bzero getcwd memmove memset mkdir mkfifo setenv strcasecmp strchr strerror strrchr strstr mkdtemp])
    121121
    122122AC_OUTPUT([Makefile src/Makefile src/common/Makefile src/mondoarchive/Makefile src/mondorestore/Makefile src/restore-scripts/Makefile src/restore-scripts/mondo/Makefile src/restore-scripts/usr/Makefile src/restore-scripts/usr/bin/Makefile src/post-nuke.sample/Makefile src/post-nuke.sample/usr/Makefile src/post-nuke.sample/usr/bin/Makefile])
  • branches/2.2.5/mondo/src/common/libmondo-tools.c

    r1653 r1654  
    966966   
    967967    char *tmp = NULL;
     968    char *p = NULL;
    968969
    969970    if (getenv("TMPDIR")) {
     
    974975        asprintf(&tmp, "/tmp/mondo.tmp.XXXXXX");
    975976    }
    976     if ((bkpinfo->tmpdir = mkdtemp(bkpinfo->tmpdir)) == NULL) {
    977         log_it("Failed to create global tmp directory %s for Mondo.",bkpinfo->tmpdir);
     977    p = mkdtemp(tmp);
     978    if (p == NULL) {
     979        log_it("Failed to create global tmp directory %s for Mondo.",tmp);
    978980        finish(-1);
    979981    }
     982    strcpy(bkpinfo->tmpdir,p);
     983    paranoid_free(tmp);
    980984    //sprintf(bkpinfo->tmpdir, "%s/tmpfs/mondo.tmp.%d", "/tmp", (int) (random() % 32768));  // for mondorestore
    981985}
Note: See TracChangeset for help on using the changeset viewer.