diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2014-11-18 15:32:53 +0000 |
---|---|---|
committer | Richard Ipsum <richardipsum@fastmail.co.uk> | 2014-11-27 18:12:14 +0000 |
commit | 80c5b0c4365a5ac69fc28c21112981df4ad53d75 (patch) | |
tree | 86fb47b3a935308aef068b9f0eb9606363b749a7 | |
parent | e36796b0cce5c2d0ae8aaf0a233fd574aae99beb (diff) | |
download | definitions-80c5b0c4365a5ac69fc28c21112981df4ad53d75.tar.gz |
FIXUPME: do not write into sudoers directly but create a file in its folder
-rw-r--r-- | openstack-nova.configure | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openstack-nova.configure b/openstack-nova.configure index ee937007..0a4d7505 100644 --- a/openstack-nova.configure +++ b/openstack-nova.configure @@ -66,4 +66,6 @@ sed -i "s/192\.168\.122\./192\.168\.1\./g" \ # Add nova to sudoers controlling which commands is running as a root # using the openstack rootwrap. ########################################################################## -echo 'nova ALL=(ALL) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf *' >> "$ROOT/etc/sudoers" +install -D -m 0440 /proc/self/fd/0 <<'EOF' "$ROOT"/etc/sudoers.d/nova-rootwrap +nova ALL=(root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf * +EOF |