From 470dc59d31359b53ee3b174e5f3d440ee9c11e34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kosta=20Pribi=C4=87?= Date: Fri, 16 Oct 2009 16:25:03 +0200 Subject: [PATCH] quagga: maknuli beskorisne stvari, bezuspjesno pokusali sa svim OpenVZ capabilityima --- linux/quagga.tcl | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/linux/quagga.tcl b/linux/quagga.tcl index e36edee..3bf8c9f 100755 --- a/linux/quagga.tcl +++ b/linux/quagga.tcl @@ -187,21 +187,20 @@ proc $MODULE.shellcmd { node } { proc $MODULE.instantiate { eid node } { l3node.instantiate $eid $node -# FreeBSD-specific: -# # XXX race if starting two imunes instances simultaneously -# nexec rm -fr /var/run/quagga -# nexec rm -f /usr/local/etc/quagga/Quagga.conf -# nexec ln -s /tmp/$eid/@ /var/run/quagga -# nexec ln -s /tmp/$eid/@/boot.conf /usr/local/etc/quagga/Quagga.conf -# foreach file { bgpd ospfd ospf6d ripd ripngd vtysh zebra } { -# nexec cp /dev/null /usr/local/etc/quagga/$file.conf -# } - upvar 0 ::cf::[set ::curcfg]::[set node]::ve_dir ve_dir + + # buduci da je stroj instanciran, tj. iskopirani su fajlovi, + # po njima se moze pisati, ali buduci da jos nije pokrenut nema + # smisla koristiti nexec vzctl... + # + #iz glavnog stroja napravi simlink u file sistemu za VE, kojem se + #kao destination preda "/boot.conf" sto kasnije ispadne VE root nexec ln -s /boot.conf $ve_dir/etc/quagga/Quagga.conf - foreach file { bgpd ospfd ospf6d ripd ripngd vtysh zebra } { - puts "maybe nexec cp /dev/null $ve_dir/etc/quagga/$file.conf" - } + +## Probably useless +# foreach file { bgpd ospfd ospf6d ripd ripngd vtysh zebra } { +# puts "maybe nexec cp /dev/null $ve_dir/etc/quagga/$file.conf" +# } } @@ -224,8 +223,17 @@ proc $MODULE.instantiate { eid node } { proc $MODULE.start { eid node } { # OpenVZ catch: prije startanja bootcmda moramo upaliti capabilities +# jer bez toga quagga uopće ne radi upvar 0 ::cf::[set ::curcfg]::[set node]::node_id node_id - foreach capability { net_admin net_raw sys_admin } { + +## Pokusali sa ovim, ali nije pomoglo +# foreach capability { chown dac_override dac_read_search fowner +# fsetid kill setgid setuid linux_immutable net_bind_service net_broadcast +# net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace +# sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod +# lease setveid ve_admin } { + + foreach capability {net_admin net_raw sys_admin} { nexec vzctl set $node_id --capability $capability:on --save } @@ -233,6 +241,7 @@ proc $MODULE.start { eid node } { upvar 0 ::cf::[set ::curcfg]::[set node]::node_id node_id nexec vzctl exec $node_id sysctl -w net/ipv4/ip_forward=1 + # TODO: IPv6 Quagga support # nexec vzctl exec $node_id sysctl -w net/ipv6/conf/all/forwarding=1 -- 2.39.5