From d85b9132e5817f7a10eb93b52c2696711bc5d18d Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 4 Dec 2007 14:06:49 -0800 Subject: * change "user group" to "user level". * "admin" => "users", "quaggavty", "vyattacfg", "sudo". * "users" => "users", "quaggavty" * use "sudo" group for sudo permissions. * don't add "root" to /etc/group. --- debian/vyatta-cfg-system.postinst.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') 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 -- cgit v1.2.3 From 21581023b1fefa1b29c6ffa34235273ec739f318 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 4 Dec 2007 17:13:19 -0800 Subject: fix for bug 2511: create empty resolv.conf in postinst. --- debian/vyatta-cfg-system.postinst.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index 4420ce7c..a29f3371 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -24,7 +24,7 @@ if [ "$sysconfdir" != "/etc" ]; then quagga/bgpd.conf quagga/ospfd.conf quagga/ospf6d.conf \ quagga/ripd.conf quagga/ripngd.conf quagga/isisd.conf \ snmp/snmpd.conf snmp/snmptrapd.conf keepalived/keepalived.conf \ - ipvsadm.rules default/ipvsadm + ipvsadm.rules default/ipvsadm resolv.conf do [ -f /etc/$conf ] && mv -f /etc/$conf /etc/$conf.vyatta-save touch /etc/$conf -- cgit v1.2.3 From be1a6170451eaf42f525783ff9bc8156bade7150 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 4 Dec 2007 18:07:37 -0800 Subject: - Only start supported daemons (zebra, ripd, ospfd, bgpd) - Add temporary version file --- debian/vyatta-cfg-system.postinst.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index a29f3371..331422c2 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -52,7 +52,11 @@ if [ "$sysconfdir" != "/etc" ]; then rm /etc/logrotate.d/*.vyatta-save >& /dev/null # quagga/daemons - sed 's/=no/=yes/' /etc/quagga/daemons.vyatta-save > /etc/quagga/daemons + sed 's/zebra=no/zebra=yes/' /etc/quagga/daemons.vyatta-save > /etc/quagga/daemons + sed -i 's/bgpd=no/bgpd=yes/' /etc/quagga/daemons + sed -i 's/ospfd=no/ospfd=yes/' /etc/quagga/daemons + sed -i 's/ripd=no/ripd=yes/' /etc/quagga/daemons + echo "log syslog warnings" >> /etc/quagga/bgpd.conf echo "log syslog warnings" >> /etc/quagga/isisd.conf echo "log syslog warnings" >> /etc/quagga/ospf6d.conf @@ -60,6 +64,9 @@ if [ "$sysconfdir" != "/etc" ]; then echo "log syslog warnings" >> /etc/quagga/ripd.conf echo "log syslog warnings" >> /etc/quagga/ripngd.conf echo "log syslog warnings" >> /etc/quagga/zebra.conf + + # add temporary version + echo "Version : eureka (beta)" > $sysconfdir/version fi # update crontab for logrotate -- cgit v1.2.3 From 431aad88a4f51ff07148f9768c4e85f9bec32a34 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 4 Dec 2007 18:47:40 -0800 Subject: add sudo entry for "users" level --- debian/vyatta-cfg-system.postinst.in | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debian') diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index a29f3371..e4334699 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -39,10 +39,19 @@ if [ "$sysconfdir" != "/etc" ]; then # sudoers [ -f /etc/sudoers ] && cp -pf /etc/sudoers /etc/sudoers.vyatta-save + + # for "admin" level (FIXME) 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 + + # for "users" level + if ! grep -q "^%users ALL=NOPASSWD: ${bindir}/sudo-users/" /etc/sudoers; then + echo -e "\n%users ALL=NOPASSWD: ${bindir}/sudo-users/" >> /etc/sudoers + fi + + # keep env vars echo "Defaults env_keep+=VYATTA_*" >> /etc/sudoers # ssh v1. remove the empty key file -- cgit v1.2.3