[PC-BSD Commits] r2792 - pbibuild/pbi-source/PBCsource

svn at pcbsd.org svn at pcbsd.org
Thu Sep 18 12:18:13 PDT 2008


Author: kris
Date: 2008-09-18 12:18:13 -0700 (Thu, 18 Sep 2008)
New Revision: 2792

Modified:
   pbibuild/pbi-source/PBCsource/pbistart.c
Log:

Updated PBI start binary to use a .PBItmp-XXXX tmp directory, so you can install multiple PBIs at once without clobbering each other. 



Modified: pbibuild/pbi-source/PBCsource/pbistart.c
===================================================================
--- pbibuild/pbi-source/PBCsource/pbistart.c	2008-09-18 18:56:23 UTC (rev 2791)
+++ pbibuild/pbi-source/PBCsource/pbistart.c	2008-09-18 19:18:13 UTC (rev 2792)
@@ -189,17 +189,12 @@
 
 char pbitmpdir[300];
 strcpy(pbitmpdir, tmpdir);
-strcat(pbitmpdir, ".PBItmp");
+strcat(pbitmpdir, ".PBItmp-XXXXX");
 
+mkdtemp(pbitmpdir);
+
 //printf("pbitmpdir: %s\n", pbitmpdir);
 
-char mkdircmd[200];
-strcpy(mkdircmd, "mkdir ");
-strcat(mkdircmd, pbitmpdir);
-
-//printf("mkdircmd: %s\n", mkdircmd);
-system(mkdircmd);
-
 /* Save username for PBI program */
 char whoamicmd[200];
 strcpy(whoamicmd, "whoami >");



More information about the Commits mailing list