diff options
author | Sage Weil <sage@redhat.com> | 2015-04-24 19:28:31 +0200 |
---|---|---|
committer | Sage Weil <sage@redhat.com> | 2015-08-27 02:34:14 +0200 |
commit | 6532e1c48656b37c59185cb7bd3840fac008050f (patch) | |
tree | b7c5c1299178831bb8a13a880bee52a914e0bca4 /debian/ceph-mds.postinst | |
parent | systemd: chown ceph:ceph /var/run/ceph (diff) | |
download | ceph-6532e1c48656b37c59185cb7bd3840fac008050f.tar.xz ceph-6532e1c48656b37c59185cb7bd3840fac008050f.zip |
debian: fix /var/lib/ceph/* directory ownership
These dirs are owned by the package; make sure they are owend by the ceph
user.
Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'debian/ceph-mds.postinst')
-rw-r--r-- | debian/ceph-mds.postinst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/ceph-mds.postinst b/debian/ceph-mds.postinst index 66b3b5fc2d7..b69efedaafb 100644 --- a/debian/ceph-mds.postinst +++ b/debian/ceph-mds.postinst @@ -18,10 +18,18 @@ set -e # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package +[ -f "/etc/default/ceph" ] && . /etc/default/ceph +[ -z "$SERVER_USER" ] && SERVER_USER=ceph +[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph case "$1" in configure) [ -x /sbin/start ] && start ceph-mds-all || : + + if ! dpkg-statoverride --list /var/lib/ceph/mds >/dev/null + then + chown $SERVER_USER:$SERVER_GROUP /var/lib/ceph/mds + fi ;; abort-upgrade|abort-remove|abort-deconfigure) : |