5 #Fix sudoers so the PATH gets passed through, otherwise chef
6 #provisioning doesn't work.
8 export EDITOR=$0 && sudo -E visudo
11 echo "Defaults exempt_group=admin" >> $1
13 #Stick the gems bin onto root's path as well.
14 sudo echo "PATH=$PATH:/var/lib/gems/1.8/bin" >>/root/.bashrc
15 # Restart sudo so it gets the changes straight away
16 sudo /etc/init.d/sudo restart
19 sudo grep "exempt_group" /etc/sudoers -q
20 if [ "$?" -eq "1" ]; then