]> git.entuzijast.net Git - imunes.git/commitdiff
quagga: maknuli beskorisne stvari, bezuspjesno pokusali sa svim OpenVZ capabilityima
authorKosta Pribić <kosta.pribic@gmail.com>
Fri, 16 Oct 2009 14:25:03 +0000 (16:25 +0200)
committerKosta Pribić <kosta.pribic@gmail.com>
Fri, 16 Oct 2009 14:25:03 +0000 (16:25 +0200)
linux/quagga.tcl

index e36edee6fd504636e68e2d47af2f59736663f7ae..3bf8c9f18617a2cc9998dd84f0869f6b0365d0ef 100755 (executable)
@@ -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