Merge pull request #156 from J0n4t4n/master
Move write paths to /var/run/python-validity
This commit is contained in:
commit
c7a3ccb2d5
5 changed files with 5 additions and 4 deletions
|
|
@ -32,7 +32,7 @@ from usb import core as usb_core
|
||||||
from validitysensor.firmware_tables import FIRMWARE_NAMES, FIRMWARE_URIS
|
from validitysensor.firmware_tables import FIRMWARE_NAMES, FIRMWARE_URIS
|
||||||
from validitysensor.usb import SupportedDevices
|
from validitysensor.usb import SupportedDevices
|
||||||
|
|
||||||
python_validity_data = '/usr/share/python-validity/'
|
python_validity_data = '/var/run/python-validity/'
|
||||||
|
|
||||||
|
|
||||||
def download_and_extract_fw(dev_type, fwdir, fwuri=None):
|
def download_and_extract_fw(dev_type, fwdir, fwuri=None):
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ class Device(dbus.service.Object):
|
||||||
return hexlify(tls.app(unhexlify(cmd))).decode()
|
return hexlify(tls.app(unhexlify(cmd))).decode()
|
||||||
|
|
||||||
|
|
||||||
backoff_file = '/usr/share/python-validity/backoff'
|
backoff_file = '/var/run/python-validity/backoff'
|
||||||
|
|
||||||
|
|
||||||
# I don't know how to tell systemd to backoff in case of multiple instance of the same template service, help!
|
# I don't know how to tell systemd to backoff in case of multiple instance of the same template service, help!
|
||||||
|
|
|
||||||
1
debian/python3-validity.postinst
vendored
1
debian/python3-validity.postinst
vendored
|
|
@ -4,6 +4,7 @@ set -e
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
if [ "$1" = "configure" ]; then
|
if [ "$1" = "configure" ]; then
|
||||||
|
mkdir -p /var/run/python-validity || true
|
||||||
validity-sensors-firmware || true
|
validity-sensors-firmware || true
|
||||||
systemctl daemon-reload || true
|
systemctl daemon-reload || true
|
||||||
udevadm control --reload-rules || true
|
udevadm control --reload-rules || true
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ from .usb import usb, CancelledException
|
||||||
from .util import assert_status, unhex
|
from .util import assert_status, unhex
|
||||||
|
|
||||||
# TODO: this should be specific to an individual device (system may have more than one sensor)
|
# TODO: this should be specific to an individual device (system may have more than one sensor)
|
||||||
calib_data_path = '/usr/share/python-validity/calib-data.bin'
|
calib_data_path = '/var/run/python-validity/calib-data.bin'
|
||||||
|
|
||||||
line_update_type1_devices = [
|
line_update_type1_devices = [
|
||||||
0xB5, 0x885, 0xB3, 0x143B, 0x1055, 0xE1, 0x8B1, 0xEA, 0xE4, 0xED, 0x1825, 0x1FF5, 0x199
|
0xB5, 0x885, 0xB3, 0x143B, 0x1055, 0xE1, 0x8B1, 0xEA, 0xE4, 0xED, 0x1825, 0x1FF5, 0x199
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ from .flash import write_flash_all, write_fw_signature, get_fw_info
|
||||||
from .sensor import reboot, write_hw_reg32, read_hw_reg32, identify_sensor
|
from .sensor import reboot, write_hw_reg32, read_hw_reg32, identify_sensor
|
||||||
from .usb import usb, SupportedDevices
|
from .usb import usb, SupportedDevices
|
||||||
|
|
||||||
firmware_home = '/usr/share/python-validity'
|
firmware_home = '/var/run/python-validity'
|
||||||
|
|
||||||
|
|
||||||
def default_fwext_name():
|
def default_fwext_name():
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue