watchquagga_helper() {
    cat /etc/quagga/daemons | sed -nr "s/^([a-z]+)=yes$/\1/p" | grep -v watchquagga | while read x ; do
       if [ -r /etc/quagga/$x.conf ] ; then
          echo $x
       fi
    done
}

vtysh_enable=yes
zebra_options=" --daemon -A 127.0.0.1"
bgpd_options="  --daemon -A 127.0.0.1"
ospfd_options=" --daemon -A 127.0.0.1"
ospf6d_options="--daemon -A 127.0.0.1"
ripd_options="  --daemon -A 127.0.0.1"
ripngd_options="--daemon -A 127.0.0.1"
isisd_options=" --daemon -A 127.0.0.1"
watchquagga_options=" -b : -s /etc/init.d/quagga:start:%s -k /etc/init.d/quagga:stop:%s -r /etc/init.d/quagga:restart:%s -Adz `watchquagga_helper`"
