bluez5.postinst 536 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # Begin section update-rc.d
  3. if type update-rc.d >/dev/null 2>/dev/null; then
  4. if [ -n "$D" ]; then
  5. OPT="-r $D"
  6. else
  7. OPT="-s"
  8. fi
  9. update-rc.d $OPT bluetooth defaults
  10. fi
  11. # End section update-rc.d
  12. OPTS=""
  13. if [ -n "$D" ]; then
  14. OPTS="--root=$D"
  15. fi
  16. if type systemctl >/dev/null 2>/dev/null; then
  17. systemctl $OPTS enable bluetooth.service
  18. if [ -z "$D" -a "enable" = "enable" ]; then
  19. systemctl --no-block restart bluetooth.service
  20. fi
  21. fi
  22. if [ x"$D" = "x" ]; then
  23. if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi
  24. fi