479 mypath = xstrcat(mypath, (char *)"/.thermferm/etc/"); |
480 mypath = xstrcat(mypath, (char *)"/.thermferm/etc/"); |
480 mkdirs(mypath, 0755); |
481 mkdirs(mypath, 0755); |
481 mypath = xstrcat(mypath, (char *)"thermferm.xml"); |
482 mypath = xstrcat(mypath, (char *)"thermferm.xml"); |
482 |
483 |
483 if (debug) |
484 if (debug) |
484 fprintf(stdout, "Writing %s\n", mypath); |
485 syslog(LOG_NOTICE, "Writing %s", mypath); |
485 |
486 |
486 if ((fp = fopen(mypath, "w")) == NULL) { |
487 if ((fp = fopen(mypath, "w")) == NULL) { |
487 syslog(LOG_NOTICE, "could not rewrite %s", mypath); |
488 syslog(LOG_NOTICE, "could not rewrite %s", mypath); |
488 free(mypath); |
489 free(mypath); |
489 return 1; |
490 return 1; |