The safest way to handle nut's state and pid files is to have them all

sent to a directory that's writeable by user uucp. I generally configure
this manually myself when I install nut, and since there are so many
other things that need manual configuration, I never thought it was
a big deal. However, a user pointed out that it'd be nice if the thing
(well, at least this part of the thing) worked more or less out of
the box, so here you go.

This change adds a /var/db/nut directory that is owned by user uucp.
This commit is contained in:
Doug Barton 2002-01-20 01:11:27 +00:00
parent 7d456e9565
commit f55829cb5a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=53369
2 changed files with 12 additions and 2 deletions

View file

@ -14,8 +14,11 @@ MAINTAINER= DougB@FreeBSD.org
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
--localstatedir=/var/db/nut \
--with-modelpath=${PREFIX}/libexec/nut \ --with-modelpath=${PREFIX}/libexec/nut \
--with-statepath=/var/db --with-statepath=/var/db/nut \
--with-altpidpath=/var/db/nut \
--with-pidpath=/var/db/nut
MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \ MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
upssched.conf.5 upssched.conf.5
@ -48,6 +51,8 @@ pre-fetch:
pre-install: pre-install:
@${MKDIR} ${PREFIX}/libexec/nut @${MKDIR} ${PREFIX}/libexec/nut
@${MKDIR} /var/db/nut
@${CHOWN} uucp /var/db/nut
NDOCDIR= ${PREFIX}/share/doc/nut NDOCDIR= ${PREFIX}/share/doc/nut

View file

@ -14,8 +14,11 @@ MAINTAINER= DougB@FreeBSD.org
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
--localstatedir=/var/db/nut \
--with-modelpath=${PREFIX}/libexec/nut \ --with-modelpath=${PREFIX}/libexec/nut \
--with-statepath=/var/db --with-statepath=/var/db/nut \
--with-altpidpath=/var/db/nut \
--with-pidpath=/var/db/nut
MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \ MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
upssched.conf.5 upssched.conf.5
@ -48,6 +51,8 @@ pre-fetch:
pre-install: pre-install:
@${MKDIR} ${PREFIX}/libexec/nut @${MKDIR} ${PREFIX}/libexec/nut
@${MKDIR} /var/db/nut
@${CHOWN} uucp /var/db/nut
NDOCDIR= ${PREFIX}/share/doc/nut NDOCDIR= ${PREFIX}/share/doc/nut