search for: confpath

Displaying 10 results from an estimated 10 matches for "confpath".

2011 Jan 18
1
[nut-commits] svn commit r2839 - branches/windows_port/scripts/Windows
...3 2011 (r2838) > +++ branches/windows_port/scripts/Windows/wininit.c Tue Jan 18 > 10:05:01 2011 (r2839) > @@ -285,8 +285,11 @@ > char fn[SMALLBUF]; > FILE *nutf; > char buf[SMALLBUF]; > + const char * conf_path; > > - snprintf(fn,sizeof(fn),"%s/nut.conf",CONFPATH); > + conf_path = confpath(); > + snprintf(fn,sizeof(fn),"%s/nut.conf",conf_path); > + free(conf_path); This won't work. You can't free() conf_path here, since it is not dynamically allocated. Use snprintf(fn, sizeof(fn), "%s/nut.conf", confpath()); instea...
2011 Jan 19
1
[nut-commits] svn commit r2845 - branches/windows_port/common
...path = NULL; > -const char * relative_state_path = NULL; > -#endif > - > static void xbit_set(int *val, int flag) > { > *val |= flag; > @@ -440,51 +435,25 @@ > > > /* Return the default path for the directory containing configuration files */ > -const char * confpath(void) > +const char * confpath(void) > { > - const char * path; > - > - if ((path = getenv("NUT_CONFPATH")) == NULL) { > #ifndef WIN32 > - path = CONFPATH; > + const char *path = getenv("NUT_CONFPATH"); > #else > - if( relative_conf_path == NU...
2006 Aug 07
0
The new formalism : you can try it
...ed by upsconfig is nammed myups, the admin nutadmin, the upsmon master monmaster and the upsmon slave is nammed monslave, and the passwords are put to "!", that is to say invalide password, and users having such a password (or an empty password) will be ignored. By default, upsconfig use CONFPATH/base_config directory to find the nut.conf template to generate the configuration file (/usr/local/nut-new-conf/etc/base_config in the example). It use CONFPATH/base_config/comments directory to make the comments in the configuration file. The comments files must be nammed conf.comm.* where * corre...
2005 Jul 12
1
[patch] Fix build of nut RPMs
...IR=%{buildroot} install-conf make DESTDIR=%{buildroot} install-cgi +make DESTDIR=%{buildroot} install-cgi-conf # move the *.sample config files to their real locations # we don't need to worry about overwriting anything since @@ -215,12 +217,10 @@ %config(noreplace) %attr(444,root,root) %{CONFPATH}/ups.conf %config(noreplace) %attr(444,root,root) %{CONFPATH}/upsd.conf %config(noreplace) %attr(400,root,root) %{CONFPATH}/upsd.users -%config(noreplace) %attr(644,root,root) /etc/sysconfig/ups %{_mandir}/man8/apcsmart.8.gz %{_mandir}/man8/belkin.8.gz %{_mandir}/man8/bestups.8.gz %{_mandir}/...
2004 Aug 06
1
IceS Segmentaion Fault
I am trying to set up Icecast and IceS. I have icecast 2.0.1 up and running. but when I try to start IceS 0.3 I get a seg fault. Here is the output: # /path/ices -r -c /confpath/ices.conf -F /playlistpath/playlist.pl -P password Logfile opened DEBUG: Sending following information to libshout: DEBUG: Stream: 0 DEBUG: Host: localhost:8001 (protocol: xaudiocast) DEBUG: Mount: /example1.mp3, Password: password DEBUG: Name: Default stream URL: http://www.site.com DEBUG: Gen...
2016 Nov 24
2
Can't get NUT slave to connect to master
Hi thanks for the reply. I installed Nut via apt-get, not from source (which I'd rather stick with if possible just for ease of security updates etc) - so I'm not too sure if TCP wrappers are there or available... This could be the problem, am I still able to add the wrappers in with prebuilt packages? Thanks very much once again. :) On 24 November 2016 at 21:51, Roger Price <roger
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
....) { va_list va; - - if (nut_debug_level < level) - return; + /* Sysadmin may use "echo n > /etc/ups/NUT_DEBUG_LEVEL" to set debug level n. RP */ + char fn[SMALLBUF]; + FILE *fp; + int ndl; /* 0 through 4 */ + + snprintf(fn, sizeof(fn), "%s/NUT_DEBUG_LEVEL", confpath()); /* E.g. /etc/ups/NUT_DEBUG_LEVEL RP */ + fp = fopen(fn, "r"); + if (!fp) { + ndl = 0; /* Ignore errors */ + } else { + if (fscanf(fp, "%d", &ndl) != 1) { + ndl = 0; /* Ignore errors */ + } + fclose(fp); + } + if (nut_debug_level < level &a...
2016 Nov 24
0
Can't get NUT slave to connect to master
...gt; This could be the problem, am I still able to add the wrappers in with prebuilt packages? Could you apt-get the source and look for the .spec file if your distribution has one. The openSUSE distribution nut.spec file contains %configure \ --disable-static \ --with-pic \ --sysconfdir=%{CONFPATH} \ --datadir=%{_datadir}/nut \ --with-all \ --without-doc \ --with-ssl \ --with-openssl \ --without-nss \ --with-wrap \ ... which shows that TCP Wrappers are included. I have the following declaration in the master's hosts.allow. (I have no hosts.deny file) upsd : localhost,...
2019 Jan 22
2
Newbie - SNMP-UPS Driver Issue
...-Wpointer-sign] for(cp = pdu->variables->val.string, x = 0; x < (int)pdu->variables->val_len; x++, cp++) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/deantrasente/Documents/GitHub/nut/drivers/snmp-ups.c:2911:46: error: use of undeclared identifier 'CONFPATH' snprintf(fn, sizeof(fn), "%s/snmp/%s.conf", CONFPATH, mib); ^ 1 warning and 10 errors generated. iMac5KSSD:~ deantrasente$ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-l...
2016 Nov 25
2
Can't get NUT slave to connect to master
...h >> prebuilt packages? >> > > Could you apt-get the source and look for the .spec file if your > distribution has one. The openSUSE distribution nut.spec file contains > > %configure \ > --disable-static \ > --with-pic \ > --sysconfdir=%{CONFPATH} \ > --datadir=%{_datadir}/nut \ > --with-all \ > --without-doc \ > --with-ssl \ > --with-openssl \ > --without-nss \ > --with-wrap \ ... > > which shows that TCP Wrappers are included. > > I have the following...