add includedir entry to sudoers if its not there

This commit is contained in:
Scott Moser 2011-10-12 20:32:16 -04:00
parent 55c9d3f13d
commit 4bec581e4e

View File

@ -61,6 +61,9 @@ if [[ $EUID -eq 0 ]]; then
fi fi
echo "Giving stack user passwordless sudo priviledges" echo "Giving stack user passwordless sudo priviledges"
# natty uec images sudoers does not have a '#includedir'. add one.
grep -q "^#includedir.*/etc/sudoers.d" /etc/sudoers ||
echo "#includedir /etc/sudoers.d" >> /etc/sudoers
( umask 226 && echo "stack ALL=(ALL) NOPASSWD:ALL" \ ( umask 226 && echo "stack ALL=(ALL) NOPASSWD:ALL" \
> /etc/sudoers.d/50_stack_sh ) > /etc/sudoers.d/50_stack_sh )