diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2012-03-26 12:27:12 -0400 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-29 07:46:13 -0700 |
commit | 3fb9ee6caa3325423ac221b5f24e980c24edafde (patch) | |
tree | 4fc432b9f9d38d7629e29e3835a73cbcda2c6e58 | |
parent | d1c8d296a23244a351bc2274e78c315b0870aeeb (diff) |
Save old volfiles in the RPM standard way.
I just got bitten by this again. It appears that the previously merged fix
was inadvertently reverted by a subsequent change.
Change-Id: I3a2067ee891fd5b8be0cd6cee58dcbc8cb6005e9
BUG: 764702
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3009
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r-- | glusterfs.spec.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 7b3cdb056ca..23ef8fae21f 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -296,9 +296,12 @@ if [ -d /etc/glusterd ]; then fi if [ -d /var/lib/glusterd/vols ]; then - #for each dir under vols, backup non-fuse .vol files as .Vol.old - for file in `find /var/lib/glusterd/vols -type f ! -name *-fuse.vol `; do - grep ".vol" $file &> /dev/null && fname=`basename $file .vol` && dname=`dirname $file` && cp $file $dname/$fname.Vol.old + # Rename old volfiles in an RPM-standard way. These aren't actually + # considered package config files, so %config doesn't work for them. + for file in $(find /var/lib/glusterd/vols -name '*.vol'); do + newfile=${file}.rpmsave + echo "warning: ${file} saved as ${newfile}" + cp ${file} ${newfile} done fi |