I've been writing a Linux device driver for some measurement devices I'm attaching to my Raspberry Pi. I've created my kernel module and an application to access the character device driver, but the device needs to be calibrated regularly and I need to store the calibration data somewhere. Where is that data usually stored? My best guess is /etc, but I'd like to hear from someone who knows more about this than I do.
This hierarchy holds state information pertaining to an application or the system. State information is data that programs modify while they run, and that pertains to one specific host. Users must never need to modify files in /var/lib to configure a package's operation.
State information is generally used to preserve the condition of an application (or a group of inter-related applications) between invocations and between different instances of the same application. State information should generally remain valid after a reboot, should not be logging output, and should not be spooled data.
/etc isn't right for calibration data, since /etc should be able to be mounted read-only.