Smart_stats plugin reporting wrong values (update)

Just a followup on Smart_stats plugin reporting wrong values since it has been closed (and still is unresolved). On Checkmk 2.4, it is recommended to update to the newer smart_posix plugin. However, it makes modifications more complicated because most of the data is transformed server-side rather than client-side. To illustrate this, we can just look at the size of both scripts:

vm-admin:~ # ls -lh /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart_posix
-rwxr-xr-x 1 root root 7.5K May 19 02:55 /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart
-rwxr-xr-x 1 root root 1.3K May 19 02:55 /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart_posix

vm-admin:~ # wc /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart_posix /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart
  36  182 1264 /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart_posix
 187  963 7622 /opt/omd/versions/2.4.0p2.cre/share/check_mk/agents/plugins/smart
 223 1145 8886 total

I’m not sure how to proceed from there to make the plugin work with older drives, I think this is a bug. The details are in the previous thread.