chdir to the neostats directory when starting. Should fix issues with all the emails we get about how opsb or secureserv can't compile.
This commit is contained in:
parent
09f49c15aa
commit
43344d47e4
4 changed files with 14 additions and 5 deletions
|
@ -8,6 +8,7 @@ NeoStats ChangeLog - Anything we add/remove/fix/change is in here (even our rant
|
|||
- Jupe was fixed - BugID#4
|
||||
- make install was failing in the tools directory on some systems. Fixed - BugID#8
|
||||
- missed -f switch in ./neostats -h summary usage
|
||||
- This should teach people to "make install" :)
|
||||
|
||||
* NeoStats * Fish * Version 2.5.2
|
||||
- Added Keeper Library for storing configuration and optionally data, and reserved space for language file storage
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC=@CC@
|
||||
CFLAGS=@CFLAGS@ -fPIC -DPIC
|
||||
CFLAGS=@CFLAGS@ -fPIC -DPIC -DNEO_PREFIX=\"@prefix@\"
|
||||
LD=ld
|
||||
LDFLAGS= -rdynamic @LIBS@
|
||||
MODLDFLAGS = -shared
|
||||
|
|
6
dns.c
6
dns.c
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: dns.c,v 1.11 2003/05/20 05:15:45 fishwaldo Exp $
|
||||
** $Id: dns.c,v 1.12 2003/05/21 09:33:17 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -184,7 +184,7 @@ void do_dns() {
|
|||
|
||||
/* call the callback function with answer set to NULL */
|
||||
dnsdata->callback(dnsdata->data, NULL);
|
||||
strcpy(seginmodule, "");
|
||||
strcpy(segvinmodule, "");
|
||||
/* delete from list */
|
||||
dnsnode1 = list_delete(dnslist, dnsnode);
|
||||
dnsnode = list_next(dnslist, dnsnode1);
|
||||
|
@ -194,7 +194,7 @@ void do_dns() {
|
|||
break;
|
||||
}
|
||||
nlog(LOG_DEBUG2, LOG_CORE, "DNS: Calling callback function with data %s", dnsdata->data);
|
||||
strncpy(segvinmodule, dns->data->mod_name, MAXHOST);
|
||||
strncpy(segvinmodule, dnsdata->mod_name, MAXHOST);
|
||||
/* call the callback function */
|
||||
dnsdata->callback(dnsdata->data, dnsdata->a);
|
||||
strcpy(segvinmodule, "");
|
||||
|
|
10
main.c
10
main.c
|
@ -22,7 +22,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: main.c,v 1.90 2003/05/20 05:15:45 fishwaldo Exp $
|
||||
** $Id: main.c,v 1.91 2003/05/21 09:33:17 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <setjmp.h>
|
||||
|
@ -85,6 +85,14 @@ int main(int argc, char *argv[])
|
|||
/* get our commandline options */
|
||||
get_options(argc, argv);
|
||||
|
||||
/* Change to the working Directory */
|
||||
if (chdir(NEO_PREFIX) < 0) {
|
||||
printf("NeoStats Could not change to %s\n", NEO_PREFIX);
|
||||
printf("Did you 'make install' after compiling?\n");
|
||||
printf("Error Was: %s\n", strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
/* before we do anything, make sure logging is setup */
|
||||
init_logs();
|
||||
|
||||
|
|
Reference in a new issue