summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorRick Balocca <rbalocca@vyatta.com>2008-08-06 15:51:21 -0700
committerRick Balocca <rbalocca@vyatta.com>2008-08-06 15:51:21 -0700
commit2a49a4affae63864797a473b14def10824e2bc83 (patch)
tree48f3c5d89797abdfd25767d4b06af8aa922a0db2 /debian
parentfe3d0a401c90030ffdbf0b9e6d3db9dc2543c304 (diff)
downloadvyatta-cfg-system-2a49a4affae63864797a473b14def10824e2bc83.tar.gz
vyatta-cfg-system-2a49a4affae63864797a473b14def10824e2bc83.zip
Merge from islavista
Diffstat (limited to 'debian')
-rw-r--r--debian/vyatta-cfg-system.postinst.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index b21437a5..0dd6248f 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -23,6 +23,7 @@ esac
ln -sf ../vyatta-net.rules /etc/udev/rules.d/$vyatta_net_rules
if [ "$sysconfdir" != "/etc" ]; then
+ touch /etc/sudoers
cp -p /etc/sudoers /etc/sudoers.bak
# for "admin" level
@@ -32,13 +33,12 @@ if [ "$sysconfdir" != "/etc" ]; then
fi
# cleanup any old entries from previous versions
- ed - /etc/sudoers <<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
@@ -85,6 +85,8 @@ if [ ! -f /etc/bash_completion ]; then
echo "source /etc/bash_completion.d/20vyatta-cfg" >> /etc/bash_completion
fi
+sed -i 's/^set /builtin set /' /etc/bash_completion
+
# Local Variables:
# mode: shell-script
# sh-indentation: 4