From 9eaa320583dd84230c2980b02dc4a161a913f172 Mon Sep 17 00:00:00 2001 From: Ben Alman Date: Mon, 27 Oct 2014 11:21:59 -0400 Subject: [PATCH] Minor ubuntu sudoers tweaks. --- conf/ubuntu/sudoers-dotfiles | 2 +- init/20_ubuntu_apt.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/ubuntu/sudoers-dotfiles b/conf/ubuntu/sudoers-dotfiles index 21a11cc122..859615f689 100644 --- a/conf/ubuntu/sudoers-dotfiles +++ b/conf/ubuntu/sudoers-dotfiles @@ -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. diff --git a/init/20_ubuntu_apt.sh b/init/20_ubuntu_apt.sh index 9faa87e12e..87e2f95318 100644 --- a/init/20_ubuntu_apt.sh +++ b/init/20_ubuntu_apt.sh @@ -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