[PC-BSD Commits] r19622 - pcbsd/current/src-sh/pbi-manager/wrapper

svn at pcbsd.org svn at pcbsd.org
Wed Oct 10 07:01:05 PDT 2012


Author: kris
Date: 2012-10-10 14:01:04 +0000 (Wed, 10 Oct 2012)
New Revision: 19622

Modified:
   pcbsd/current/src-sh/pbi-manager/wrapper/main.c
Log:

Add fix if sysctl can't determine path

Submitted by: John Hixson (iXsystems)	


Modified: pcbsd/current/src-sh/pbi-manager/wrapper/main.c
===================================================================
--- pcbsd/current/src-sh/pbi-manager/wrapper/main.c	2012-10-10 10:56:49 UTC (rev 19621)
+++ pcbsd/current/src-sh/pbi-manager/wrapper/main.c	2012-10-10 14:01:04 UTC (rev 19622)
@@ -44,6 +44,9 @@
     char mypath[1024];
     size_t cb = sizeof(mypath);
     sysctl(mib, 4, mypath, &cb, NULL, 0);
+
+    if ( mypath[0] == 0 )
+      strcpy(mypath, argv[0]);
     
     // Figure out where we are
     if (realpath(mypath, bfile) == NULL) {



More information about the Commits mailing list