Move pidfiles from /var/run/nut to /run/nut, there is nothing else to do since /var/run is a symlink to /run for some times now (policy 3.9.3)
This commit is contained in:
parent
b493284ac5
commit
b11ef489f7
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -22,8 +22,10 @@ nut (2.7.4-9) UNRELEASED; urgency=medium
|
||||||
* debian/libnutclient0.symbols: Adjust the symbols due to C++ changes
|
* debian/libnutclient0.symbols: Adjust the symbols due to C++ changes
|
||||||
* debian/patches/0011-use-pkgconfig-module.patch: Use pkg-config module
|
* debian/patches/0011-use-pkgconfig-module.patch: Use pkg-config module
|
||||||
names instead of listing the libraries, to please lintian
|
names instead of listing the libraries, to please lintian
|
||||||
|
* Move pidfiles from /var/run/nut to /run/nut, there is nothing else to do
|
||||||
|
since /var/run is a symlink to /run for some times now (policy 3.9.3)
|
||||||
|
|
||||||
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 13:06:35 +0200
|
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 13:18:34 +0200
|
||||||
|
|
||||||
nut (2.7.4-8) unstable; urgency=medium
|
nut (2.7.4-8) unstable; urgency=medium
|
||||||
|
|
||||||
|
|
4
debian/nut-client.init
vendored
4
debian/nut-client.init
vendored
|
@ -19,7 +19,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
||||||
NAME=nut-client
|
NAME=nut-client
|
||||||
DESC="NUT - power device monitor and shutdown controller"
|
DESC="NUT - power device monitor and shutdown controller"
|
||||||
CONFIG=/etc/nut/nut.conf
|
CONFIG=/etc/nut/nut.conf
|
||||||
pid_dir=/var/run/nut
|
pid_dir=/run/nut
|
||||||
upsmon_pid=${pid_dir}/upsmon.pid
|
upsmon_pid=${pid_dir}/upsmon.pid
|
||||||
upsmon=/sbin/upsmon
|
upsmon=/sbin/upsmon
|
||||||
log=">/dev/null 2>/dev/null"
|
log=">/dev/null 2>/dev/null"
|
||||||
|
@ -50,7 +50,7 @@ if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if /var/run/nut exists and has the correct perms
|
# Check if /run/nut exists and has the correct perms
|
||||||
check_var_directory() {
|
check_var_directory() {
|
||||||
[ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \
|
[ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \
|
||||||
&& chown root:nut ${pid_dir} \
|
&& chown root:nut ${pid_dir} \
|
||||||
|
|
14
debian/nut-client.postinst
vendored
14
debian/nut-client.postinst
vendored
|
@ -43,15 +43,15 @@ case "$1" in
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure that /var/run/nut exists and has the correct ownerships
|
# make sure that /run/nut exists and has the correct ownerships
|
||||||
if [ ! -d /var/run/nut ] ; then
|
if [ ! -d /run/nut ] ; then
|
||||||
mkdir -p /var/run/nut
|
mkdir -p /run/nut
|
||||||
fi
|
fi
|
||||||
if [ -d /var/run/nut ] ; then
|
if [ -d /run/nut ] ; then
|
||||||
chown root:nut /var/run/nut
|
chown root:nut /run/nut
|
||||||
chmod 770 /var/run/nut
|
chmod 770 /run/nut
|
||||||
if which restorecon >/dev/null 2>&1; then
|
if which restorecon >/dev/null 2>&1; then
|
||||||
restorecon /var/run/nut
|
restorecon /run/nut
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
4
debian/nut-server.init
vendored
4
debian/nut-server.init
vendored
|
@ -18,7 +18,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
||||||
NAME=nut-server
|
NAME=nut-server
|
||||||
DESC="NUT - power devices information server and drivers"
|
DESC="NUT - power devices information server and drivers"
|
||||||
CONFIG=/etc/nut/nut.conf
|
CONFIG=/etc/nut/nut.conf
|
||||||
pid_dir=/var/run/nut
|
pid_dir=/run/nut
|
||||||
upsd_pid=${pid_dir}/upsd.pid
|
upsd_pid=${pid_dir}/upsd.pid
|
||||||
upsd=/sbin/upsd
|
upsd=/sbin/upsd
|
||||||
upsdrvctl=/sbin/upsdrvctl
|
upsdrvctl=/sbin/upsdrvctl
|
||||||
|
@ -48,7 +48,7 @@ if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if /var/run/nut exists and has the correct perms
|
# Check if /run/nut exists and has the correct perms
|
||||||
check_var_directory() {
|
check_var_directory() {
|
||||||
[ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \
|
[ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \
|
||||||
&& chown root:nut ${pid_dir} \
|
&& chown root:nut ${pid_dir} \
|
||||||
|
|
14
debian/nut-server.postinst
vendored
14
debian/nut-server.postinst
vendored
|
@ -45,15 +45,15 @@ case "$1" in
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure that /var/run/nut exists and has the correct ownerships
|
# make sure that /run/nut exists and has the correct ownerships
|
||||||
if [ ! -d /var/run/nut ] ; then
|
if [ ! -d /run/nut ] ; then
|
||||||
mkdir -p /var/run/nut
|
mkdir -p /run/nut
|
||||||
fi
|
fi
|
||||||
if [ -d /var/run/nut ] ; then
|
if [ -d /run/nut ] ; then
|
||||||
chown root:nut /var/run/nut
|
chown root:nut /run/nut
|
||||||
chmod 770 /var/run/nut
|
chmod 770 /run/nut
|
||||||
if which restorecon >/dev/null 2>&1; then
|
if which restorecon >/dev/null 2>&1; then
|
||||||
restorecon /var/run/nut
|
restorecon /run/nut
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
2
debian/nut-server.prerm
vendored
2
debian/nut-server.prerm
vendored
|
@ -21,7 +21,7 @@ case "$1" in
|
||||||
[ -L /usr/doc/nut ] && rm -f /usr/doc/nut
|
[ -L /usr/doc/nut ] && rm -f /usr/doc/nut
|
||||||
# do stop the daemon on remove
|
# do stop the daemon on remove
|
||||||
invoke-rc.d nut stop && sleep 1
|
invoke-rc.d nut stop && sleep 1
|
||||||
[ -d /var/run/nut ] && rm -rf /var/run/nut/
|
[ -d /run/nut ] && rm -rf /run/nut/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
upgrade)
|
upgrade)
|
||||||
|
|
6
debian/rules
vendored
6
debian/rules
vendored
|
@ -28,12 +28,12 @@ DEB_CONFIGURE_EXTRA_FLAGS := --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
|
||||||
--with-cgi \
|
--with-cgi \
|
||||||
--with-dev \
|
--with-dev \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
--with-statepath=/var/run/nut \
|
--with-statepath=/run/nut \
|
||||||
--with-altpidpath=/var/run/nut \
|
--with-altpidpath=/run/nut \
|
||||||
--with-drvpath=/lib/nut \
|
--with-drvpath=/lib/nut \
|
||||||
--with-cgipath=/usr/lib/cgi-bin/nut \
|
--with-cgipath=/usr/lib/cgi-bin/nut \
|
||||||
--with-htmlpath=/usr/share/nut/www \
|
--with-htmlpath=/usr/share/nut/www \
|
||||||
--with-pidpath=/var/run/nut \
|
--with-pidpath=/run/nut \
|
||||||
--datadir=/usr/share/nut \
|
--datadir=/usr/share/nut \
|
||||||
--with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
|
--with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
|
||||||
--with-user=nut --with-group=nut
|
--with-user=nut --with-group=nut
|
||||||
|
|
2
debian/tests/test-nut.py
vendored
2
debian/tests/test-nut.py
vendored
|
@ -99,7 +99,7 @@ class NutTestCommon(testlib.TestlibCase):
|
||||||
and standard settings for local monitoring
|
and standard settings for local monitoring
|
||||||
'''
|
'''
|
||||||
self.tmpdir = ""
|
self.tmpdir = ""
|
||||||
self.rundir = "/var/run/nut"
|
self.rundir = "/run/nut"
|
||||||
testlib.cmd(['/bin/rm -f' + self.powerdownflag])
|
testlib.cmd(['/bin/rm -f' + self.powerdownflag])
|
||||||
|
|
||||||
testlib.config_replace('/etc/nut/ups.conf', '''
|
testlib.config_replace('/etc/nut/ups.conf', '''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user