summaryrefslogtreecommitdiff
path: root/strata/openstack-services/cinder.morph
blob: cd680b0984a2b8df67e7da36f9d04c17f72cae3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
name: cinder
kind: chunk
build-system: python-distutils
post-install-commands:
# Install rootwrap.conf
- install -D -m 640 etc/cinder/rootwrap.conf "$DESTDIR"/etc/cinder/rootwrap.conf
# Move rootwrap files to a proper location
- mkdir -p "$DESTDIR"/etc/cinder/rootwrap.d
- install -D -m 644 etc/cinder/rootwrap.d/* "$DESTDIR"/etc/cinder/rootwrap.d/
# Add cinder to sudoers controlling which commands will run as a root
# using the openstack rootwrap.
- mkdir -p "$DESTDIR"/etc/sudoers.d
- |
  install -D -m 0440 /proc/self/fd/0 <<'EOF' "$DESTDIR"/etc/sudoers.d/cinder-rootwrap
  Defaults:cinder !requiretty

  cinder ALL=(root) NOPASSWD: /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
  EOF