You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2013 Julius Schulz-Zander <julius@net.t-labs.tu-berlin.de>
  3. # Copyright (C) 2014 OpenWrt.org
  4. START=15
  5. USE_PROCD=1
  6. start_service() {
  7. [ -x /var/run/openvswitch ] || mkdir -p /var/run/openvswitch
  8. [ -e /etc/openvswitch/conf.db ] || {
  9. /usr/bin/ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema
  10. }
  11. # ovsdb-server
  12. procd_open_instance
  13. procd_set_param command /usr/sbin/ovsdb-server
  14. procd_append_param command --remote=punix:/var/run/db.sock
  15. procd_append_param command --remote=db:Open_vSwitch,Open_vSwitch,manager_options
  16. procd_append_param command --pidfile=/var/run/ovsdb-server.pid
  17. procd_set_param respawn
  18. procd_append_param respawn 3600
  19. procd_append_param respawn 5
  20. procd_append_param respawn -1
  21. procd_close_instance
  22. # ovs-vswitchd
  23. procd_open_instance
  24. procd_set_param command /usr/sbin/ovs-vswitchd
  25. procd_append_param command --pidfile=/var/run/ovs-vswitchd.pid
  26. procd_set_param respawn
  27. procd_append_param respawn 3600
  28. procd_append_param respawn 5
  29. procd_append_param respawn -1
  30. procd_close_instance
  31. }