Permalink
Browse files

Configs-to-clean move to /var/lib

  • Loading branch information...
Sean Reifschneider
Sean Reifschneider committed Mar 20, 2012
1 parent 598800e commit 72d928edcb34fa9b35d14d675e0a3466b748501f
Showing with 11 additions and 6 deletions.
  1. +2 −0 WHATSNEW
  2. +1 −1 drbdlinks
  3. +1 −1 drbdlinks.conf
  4. +2 −2 drbdlinks.spec
  5. +5 −2 drbdlinksclean.init
View
@@ -1,3 +1,5 @@
+Changing configs-to-clean to be under "/var/lib" rather than "/var/run".
+ Found by Alan Robertson, RHEL 6.x will clean out "/var/run/drbdlinks".
Adding a syslog note to drbdlinksclean when it cleans up copied configs.
The XML meta-data needs to have blank lines removed, reported by
Alan Robertson.
View
@@ -7,7 +7,7 @@
# drbdlinks is under the following license: GPLv2
configFile = '/etc/drbdlinks.conf'
-cleanConfigsDirectory = '/var/run/drbdlinks/configs-to-clean'
+cleanConfigsDirectory = '/var/lib/drbdlinks/configs-to-clean'
import os, string, re, sys, stat, syslog, shutil
syslog.openlog('drbdlinks', syslog.LOG_PID)
View
@@ -40,7 +40,7 @@ debug(1)
# files must have a unique base name ("/yada/yada/drbdlinks-www.conf" and
# "/yada/drbdlinks-nfs.conf", NOT "/path/www/drbdlinks.conf"
# and "/path/nfs/drbdlinks.conf"). These files are copied into
-# "/var/run/drbdlinks/configs-to-clean" at "start" time so that drbdlinks
+# "/var/lib/drbdlinks/configs-to-clean" at "start" time so that drbdlinks
# can clean them later.
cleanthisconfig(1)
View
@@ -45,7 +45,7 @@ mkdir -p "$RPM_BUILD_ROOT"/etc//init.d/
mkdir -p "$RPM_BUILD_ROOT"/etc/ha.d/resource.d/
mkdir -p "$RPM_BUILD_ROOT"/usr/lib/ocf/resource.d/tummy/
mkdir -p "$RPM_BUILD_ROOT"/usr/sbin/
-mkdir -p "$RPM_BUILD_ROOT"/var/run/drbdlinks/configs-to-clean
+mkdir -p "$RPM_BUILD_ROOT"/var/lib/drbdlinks/configs-to-clean
mkdir -p "%{buildroot}/%{_mandir}"/man8
# copy over files
@@ -71,7 +71,7 @@ chkconfig --del drbdlinksclean
/etc/init.d/drbdlinksclean
/etc/ha.d/resource.d/drbdlinks
/usr/lib/ocf/resource.d/tummy
-%dir /var/run/drbdlinks/configs-to-clean
+%dir /var/lib/drbdlinks/configs-to-clean
%config /etc/drbdlinks.conf
%doc README LICENSE
%{_mandir}/man8/*
View
@@ -26,7 +26,9 @@
FOUNDFILE=0
[ -f /etc/drbdlinks.conf ] && FOUNDFILE=1
-for FILE in /var/run/drbdlinks/configs-to-clean/*
+# also clean up old /var/run location.
+for FILE in /var/lib/drbdlinks/configs-to-clean/* \
+ /var/run/drbdlinks/configs-to-clean/*
do
[ ! -f "$FILE" ] && continue
FOUNDFILE=1
@@ -63,7 +65,8 @@ case "$1" in
fi
# clean up any supplemental config files
- for FILE in /var/run/drbdlinks/configs-to-clean/*
+ for FILE in /var/lib/drbdlinks/configs-to-clean/* \
+ /var/run/drbdlinks/configs-to-clean/*
do
[ ! -f "$FILE" ] && continue
echo -n "Cleaning up '${FILE##*/}' links..."

0 comments on commit 72d928e

Please sign in to comment.