Skip to content

Commit

Permalink
Minor ubuntu sudoers tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy committed Oct 27, 2014
1 parent e2abd9c commit 9eaa320
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion conf/ubuntu/sudoers-dotfiles
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file gets copied to /etc/sudoers.d/ by init/10_ubuntu.sh
# This file gets copied to /etc/sudoers.d/ by init/20_ubuntu_apt.sh
# Reference: http://ubuntuforums.org/showthread.php?t=1132821

# Command aliases.
Expand Down
7 changes: 3 additions & 4 deletions init/20_ubuntu_apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ EOF
read -N 1 -t $prompt_delay -p "Update sudoers file? [y/N] " update_sudoers; echo
if [[ "$update_sudoers" =~ [Yy] ]]; then
e_header "Updating sudoers"
visudo -cf "$sudoers_src" >/dev/null && {
sudo cp "$sudoers_src" "$sudoers_dest" &&
sudo chmod 0440 "$sudoers_dest"
} >/dev/null 2>&1 &&
visudo -cf "$sudoers_src" &&
sudo cp "$sudoers_src" "$sudoers_dest" &&
sudo chmod 0440 "$sudoers_dest" &&
echo "File $sudoers_dest updated." ||
echo "Error updating $sudoers_dest file."
else
Expand Down

0 comments on commit 9eaa320

Please sign in to comment.