search for: statepath

Displaying 20 results from an estimated 81 matches for "statepath".

2011 Jan 22
1
Building and configuring nut 2.6.0 - documentation issue?
This morning I finished building and configuring nut 2.6.0 on OpenBSD 4.8, and it is running fine. While I was in the config files, I noticed what looks like it may be a discrepancy between the config file commetns and the configure script default. uspd.conf has the following comment: # STATEPATH <path> # STATEPATH /var/run/nut # # Tell upsd to look for the driver state sockets in 'path' rather # than the default that was compiled into the program. When I read that, I thought the default path compiled into the program would be /var/run/nut However, configure --help shows...
2011 May 27
6
Environment Variables
...H Changes the directory where pid files are stored. By default this is /var/run. Certain programs like upsmon will leave files here. --with-altpidpath=PATH Programs that normally don't have root powers, like the drivers and upsd, write their pid files here. By default this is whatever the statepath is, as those programs should be able to write there. --with-statepath=PATH Change the default location of the state sockets created by the drivers. The NUT_STATEPATH environment variable overrides this at run time. Default is /var/state/ups. ----------------------------------- So, the PID pat...
2015 Jul 07
4
upsd not starting sometimes (Porteus 3.1, nut 2.7.2)
I am running tests on my system and UPS, making sure that it is reliably able to come up, detect power loss, shutdown safely, and then come back up when the power returns. It does that MOST of the time. However, a significant part of the time, the system comes up, and then doesn't respond to loss of power. Doing some checking, I find that the reason is because upsd never started. Capturing
2013 Jul 30
0
nut package with Riello UPS support
...From the FreeBSD ports tree: /usr/ports/sysutils/nut/Makefile: STATEDIR?= /var/db/nut [...] CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \ --program-transform-name="" \ --localstatedir=${STATEDIR} \ --datadir=${PREFIX}/etc/nut \ --with-drvpath=${PREFIX}/libexec/nut \ --with-statepath=${STATEDIR} \ --with-altpidpath=${STATEDIR} \ --with-pidpath=${STATEDIR} \ --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig \ --with-user=${NUT_USER} \ --with-group=${NUT_GROUP} \ --with-dev I think you need to re-run ./configure in the source tree with the driver, using the arguments...
2015 Jul 08
0
upsd not starting sometimes (Porteus 3.1, nut 2.7.2)
...e first, or use the 'reload' command. What might be happening is that the PID file is left over from the last test, and another process got that PID instead. Due to history and conflicting requirements, the path selection is not as simple as it could be. From ./configure --help: --with-statepath=PATH path for ups state files (/var/state/ups) --with-altpidpath=PATH path for driver/upsd .pid files (<statepath>) [...] --with-pidpath=PATH path for .pid files (/var/run) You might not want to use the default for --with-altpidpath: /var/state/* is not generally cleared at boot t...
2011 Jan 19
1
[nut-commits] svn commit r2845 - branches/windows_port/common
...th is allocating memory with xstrdup. Doesn't this line produce a memory leak ? > #endif > - } > - > - return path; > + return (path != NULL) ? path : CONFPATH; > } > > /* Return the default path for the directory containing state files */ > -const char * dflt_statepath(void) > +const char * dflt_statepath(void) > { > - const char * path; > - > - if ((path = getenv("NUT_STATEPATH")) == NULL) { > #ifndef WIN32 > - path = STATEPATH; > + const char *path = getenv("NUT_STATEPATH"); > #else > - if( relative_state_...
2007 Jun 06
1
Autodetecting running drivers by the 'upsd' server
...If we ever want to autodetect (by whatever means) what drivers are started (udev?) and we start them automatically, this probably means these drivers will not be configured in 'ups.conf' either and won't be seen. What we could also do, is to let the server checkout the contents of the STATEPATH and contact to all sockets it finds there. This would also do away with the necessity to keep the socketnames in the drivers and the server in sync. There are two caveats though: 1) Drivers must have created their socket before the server is started. This is not different from what we have now, bu...
2007 Jun 07
2
Reserve '_' in driver names?
I'm trying to see if we can make upsd autodetect the driver sockets from the STATEPATH. This works quite well and uses surprisingly little code (much less than parsing the 'ups.conf' file). However, since I can no longer read the name from the 'ups.conf' file, I need to extract this from the name of the socket. We might simply strip the drivername from the socket name...
2005 Oct 23
0
FC4 + nut => shutdown sequence conundrum
...pool and /var/mail can grow and potentially consume the entire volume. Looking at the source code for drivers/main.c I observe that the chdir is happening in main() on line 551. The call to shutdown the UPS happens a few lines later, on line 568. The interesting lines are: if (chdir(dflt_statepath())) fatal("Can't chdir to %s", dflt_statepath()); setup_signals(); /* clear out callback handler data */ memset(&upsh, '\0', sizeof(upsh)); upsdrv_initups(); /* now see if things are very wrong out there */...
2013 Jul 30
3
nut package with Riello UPS support
# reboot Connection to 192.168.5.81 closed by remote host. Connection to 192.168.5.81 closed. ppo at admin:/tmp$ ssh root at 192.168.5.81 root at 192.168.5.81's password: Last login: Tue Jul 30 14:10:49 2013 from pc-ppo.kh.ektos OpenBSD 5.3 (GENERIC.MP) #58: Tue Mar 12 18:43:53 MDT 2013 # ps -aux | grep ups root 2254 0.0 0.0 324 700 p0 S+ 5:29PM 0:00.00 grep ups # ps -aux
2007 Jan 23
2
Re: [nut-commits] svn commit r731
Hi Arjen, in server/upsd.c r731, you moved the call conf_load() from after check_perms() (~ l.1020) to before setupsignals() (~ l.989). The problem is that conf_load() needs to open the ups driver socket, and it assumes that STATEPATH is the current working directory. The directory is only set in l.1016. Therefore, the first attempt to open a socket will always fail. From the user's point of view: Can't connect to UPS [mge] (mge): No such file or directory The socket is later opened on the second attempt, but only afte...
2009 Sep 01
4
Tripplite_usb Driver fail on OMNIVS1500
Model: Tripp-lite OMNIVS1500 Error: Network UPS Tools - UPS driver controller 2.2.1- Network UPS Tools - Tripp Lite OMNIVS and SMARTPRO driver 0.11 (2.2.1-) Warning: This is an experimental driver. Some features may not function correctly. Detected a UPS: unknown/unknown libusb_set_report() returned -1 instead of 8 Could not reset watchdog. Please send model information to nut-upsdev mailing
2013 Jul 01
3
Installing NUT on Solaris
...om sunfreeware libiconv-1.14-sol10-sparc-local gcc-3.4.6-sol10-sparc-local make-3.82-sol10-sparc-local libintl-3.4.0-sol10-sparc-local Working from Mike Nowak's notes at: https://blogs.oracle.com/mikey/entry/network_ups_tools_on_solaris > ./configure --prefix=/opt/nut --with-statepath=/var/ups --with-user=ups --with-group=ups returns alright, but the subsequent "make" fails with: > make[1]: Entering directory `/opt/downloads/nut-2.6.5/common' > /bin/bash ../libtool --tag=CC --mode=link gcc -I../include -g -O2 -Wall -Wsign-compare -o libparseconf.la pars...
2014 Jun 04
1
FreeNAS configuration command
Anybody knows what configure command settings FreeNAS use to compile NUT? More info on my journey: http://forums.freenas.org/index.php?threads/nobreak-bz1200-br-back-ups-rs-1200va-600w-bivolt-115-nt.20247/ Thanks Bruno -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Jan 03
2
building trunk
...conf259/autoheader /usr/local/libexec/automake19/automake -ac /usr/local/libexec/autoconf259/autoconf ./configure --with-cgi --with-user=nutmon --with-drvpath=/usr/local/libexec/nut\ --with-cgipath=/usr/local/www/cgi-bin/nut --with-htmlpath=/usr/local/etc/nut\ --with-pidpath=/var/db/nut --with-statepath=/var/db/nut --without-pkgconfig-dir\ --mandir=/usr/local/man --bindir=/usr/local/bin --sbindir=/usr/local/sbin ..my configure fails with this: configure: creating ./config.status config.status: creating clients/Makefile config.status: error: cannot find input file: clients/Makefile.in I imagin...
2010 Mar 10
1
Tripp-Lite SU2200XLA problem (fwd)
...udo for root access, and let the driver setuid() to "nut".) > > For the upsd issue, check your state path and pid paths (also options to > ./configure). > Sorry, I should have clarified this. My configure options were: ./configure --with-user=nut --with-group=dialout --with-statepath=/var/run/ nut --with-pidpath=/var/run/nut --with-altpidpath=/var/run/nut --sysconfdir=/ etc/ups --with-drvpath=/sbin --with-all --with-pkgconfig-dir=/usr/lib/ pkgconfig --disable-static --without-ipv6 mostly ripped from the Fedora 12 2.4.1 specfile. I'm pretty sure the --with-user=nut options...
2007 May 18
1
i'm confused
...to think maybe it's a bigger issue (thus i joined this list). Right to start with if i have the following in ups.conf: [apc] driver=apcsmart port=/dev/ttyS0 desc="Test UPS" and in upsd.conf among other items i have the following because i compiled with this state dir : STATEPATH /var/run/nut upsd fails with "upsd[2947]: Can't connect to UPS [apc] (apc): No such file or directory". So i looked at the code for and found that in drivers/dstate.c dstate_init function creates the socket as follows - snprintf(sockname, sizeof(sockname), "%s/%s-%s",...
2013 Jul 31
2
nut package with Riello UPS support
Thank you very much!! I have tried configure downloaded source with # ./configure --with-user=_ups --with-group=_ups --with-statepath=/var/db/nut/ and then build driver and copy again. but this doesn't help (driver pid still in the /var/state/ups). Maybe I must add more arguments to change driver's pid location, but I did next, I changed this argument in openbsd ports: # pkg_delete nut # cd /usr/ports/sysutils/nut/ edit M...
2020 Jun 21
2
USBHID-UPS not detecting USB UPS even though options match
...ormation, I will attempt to provide it. [toxicsauce at rack-monitor ~]$ upsd -V Network UPS Tools upsd 2.7.4 [toxicsauce at rack-monitor ~]$ [toxicsauce at rack-monitor ~]$ uname -a Linux rack-monitor 4.19.120_1 #1 SMP Mon May 11 19:27:08 UTC 2020 armv7l GNU/Linux [toxicsauce at rack-monitor ~]$ Statepath is /run/ups: 0 drwxrwx--- 2 nut nut 40 Dec 31 17:16 ups [toxicsauce at rack-monitor run]$ ls -lash /etc/ups/ total 52K 4.0K drwxr-xr-x 2 root root 4.0K May 17 2020 . 4.0K drwxr-xr-x 31 root root 4.0K May 17 2020 .. 4.0K -rw-r----- 1 root nut 1.6K May 17 2020 nut.conf 8.0K -rw-r-----...
2013 Jul 31
2
Fw: infosec e4
I?m wondering if what I have done is good : # get the source from github on my computer # autogen.sh # name=nut # ./configure --prefix=/ --sysconfdir=/etc/$name --mandir=/usr/share/man --libdir=/usr/lib --includedir=/usr/include --datadir=/usr/share/$name --with-statepath=/var/run/nut --with-altpidpath=/var/run/nut --with-drvpath=/lib/nut --with-pidpath=/var/run/$name --with-user=$name ?with-group=$name --without-ssl There was an error : ./configure: line 7079: syntax error near unexpected token `CPPUNIT,' ./configure: line 7079: `PKG_CHECK_MODULES(CP...