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.in13
1 files changed, 6 insertions, 7 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 109e59d1..0dd6248f 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -33,13 +33,12 @@ if [ "$sysconfdir" != "/etc" ]; then
fi
# cleanup any old entries from previous versions
- ed /etc/sudoers >&/dev/null <<EOF
-/### BEGIN VYATTA/,/### END VYATTA/d
-/Cmnd_Alias IPTABLE/,/PPPOE_CMDS/d
-g/sudo-users/d
-g/env_keep+=VYATTA/d
-wq
-EOF
+ sed -i /etc/sudoers \
+ -e '/### BEGIN VYATTA/,/### END VYATTA/d' \
+ -e '/Cmnd_Alias IPTABLE/,/PPPOE_CMDS/d' \
+ -e '/sudo-users/d' \
+ -e '/env_keep+=VYATTA/d' || true
+
# Add Vyatta entries
cat <<"EOF" >>/etc/sudoers
### BEGIN VYATTA