summaryrefslogtreecommitdiff
path: root/debian/vyatta-cfg-system.postinst.in
diff options
context:
space:
mode:
Diffstat (limited to 'debian/vyatta-cfg-system.postinst.in')
-rw-r--r--debian/vyatta-cfg-system.postinst.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 2c9f0fbf..4420ce7c 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -39,8 +39,9 @@ if [ "$sysconfdir" != "/etc" ]; then
# sudoers
[ -f /etc/sudoers ] && cp -pf /etc/sudoers /etc/sudoers.vyatta-save
- if ! grep -q '%quaggavty ALL=NOPASSWD: ALL' /etc/sudoers; then
- echo -e "\n%quaggavty ALL=NOPASSWD: ALL" >> /etc/sudoers
+ sed -i 's/^# %sudo ALL=NOPASSWD: ALL/%sudo ALL=NOPASSWD: ALL/' /etc/sudoers
+ if ! grep -q '^%sudo ALL=NOPASSWD: ALL' /etc/sudoers; then
+ echo -e "\n%sudo ALL=NOPASSWD: ALL" >> /etc/sudoers
fi
echo "Defaults env_keep+=VYATTA_*" >> /etc/sudoers