Devuan fork of gpsd
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.
 
 
 
 
 
 

43 lines
883 B

  1. #! /bin/sh
  2. # postinst script for gpsd
  3. set -e
  4. . /usr/share/debconf/confmodule
  5. if [ "$1" = "configure" ] ; then
  6. #remove the old udev rules link
  7. if dpkg --compare-versions "$2" lt "2.37-1"; then
  8. [ ! -L /etc/udev/rules.d/025_gpsd.rules ] || rm -f /etc/udev/rules.d/025_gpsd.rules || true
  9. fi
  10. # generate /etc/default/gpsd
  11. db_get gpsd/device
  12. DEVICES=$RET
  13. db_get gpsd/start_daemon
  14. START_DAEMON=$RET
  15. db_get gpsd/daemon_options
  16. OPTS=$RET
  17. db_get gpsd/autodetection
  18. USBAUTO=$RET
  19. cat <<EOF > /etc/default/gpsd
  20. # Default settings for gpsd.
  21. # Please do not edit this file directly - use \`dpkg-reconfigure gpsd' to
  22. # change the options.
  23. START_DAEMON="$START_DAEMON"
  24. DAEMON_OPTS="$OPTS"
  25. DEVICES="$DEVICES"
  26. USBAUTO="$USBAUTO"
  27. EOF
  28. fi
  29. #DEBHELPER#
  30. # tell debconf we are done. otherwise, it hangs waiting for the daemon.
  31. db_stop;
  32. exit 0