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.

33 lines
898 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
  3. USE_PROCD=1
  4. START=70
  5. stop_service() {
  6. # Load common utils
  7. . /etc/modemmanager/modemmanager.common
  8. # Set all configured interfaces as unavailable
  9. mm_cleanup_interfaces
  10. }
  11. start_service() {
  12. # Load common utils
  13. . /etc/modemmanager/modemmanager.common
  14. # Always make sure the rundir exists
  15. mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}"
  16. # Initially set all configured interfaces as unavailable
  17. mm_cleanup_interfaces
  18. # Report cached events (will wait for MM to be launched)
  19. ( mm_report_events_from_cache ) >/dev/null 2>&1 &
  20. # Setup ModemManager service
  21. procd_open_instance
  22. procd_set_param command /usr/sbin/ModemManager
  23. procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
  24. procd_set_param pidfile "${MODEMMANAGER_PID_FILE}"
  25. procd_close_instance
  26. }