[Pkg-ceph-commits] [ceph] 01/02: Ensure that empty backup folder is deleted

James Downing Page jamespage at moszumanska.debian.org
Mon Jun 13 11:05:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

jamespage pushed a commit to branch ubuntu-xenial
in repository ceph.

commit 8f643ee1b218b9c2569949b5ba897cbdc4e73660
Author: James Page <james.page at ubuntu.com>
Date:   Mon Jun 13 12:03:53 2016 +0100

    Ensure that empty backup folder is deleted
    
    (cherry picked from commit 3aa0724e079d4caec017777c40af768b74a1c731)
---
 debian/ceph-common.postinst | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/ceph-common.postinst b/debian/ceph-common.postinst
index 96de79e..c30237c 100644
--- a/debian/ceph-common.postinst
+++ b/debian/ceph-common.postinst
@@ -45,8 +45,6 @@ finish_mv_ceph_defaults() {
     if [ -f "/etc/default/ceph" ]; then
         mv -f "/etc/default/ceph" "/etc/default/ceph.dpkg-new"
     fi
-    # Preserve /etc/default/ceph directory just in case users
-    # have added additional files to it.
     mv -f "/etc/default/ceph.dpkg-backup/ceph" "/etc/default/ceph"
 }
 
@@ -101,6 +99,11 @@ case "$1" in
        if [ -n "$2" ] &&
           dpkg --compare-versions -- "$2" le-nl 10.2.1-0ubuntu1; then
            finish_mv_ceph_defaults
+	   # Preserve dpkg-backup directory if it still contains
+	   # any file
+           if ! ls -1qA "/etc/default/ceph.dpkg-backup" | grep -q . ; then
+              rm -rf "/etc/default/ceph.dpkg-backup"
+           fi
        fi
     ;;
     abort-upgrade|abort-remove|abort-deconfigure)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list