martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
786 stars 86 forks source link

Nwipe doesn't auto load drivetemp module on Debian 11 - drive temperatures missing #389

Closed PartialVolume closed 2 years ago

PartialVolume commented 2 years ago

The error "warning: hwmon: Unable to load module drivetemp, drivetemp may be built into the kernel."

Although hwmon & drivetemp modules are automatically installed in Debian 11, due to /sbin not being in the $PATH when logged in as root nwipe fails to run the modprobe when attempting to load the drivetemp module at startup and therefore the shell returns command not found. nwipe doesn't report this quite correctly and that needs fixing too.

The main fix is to use much the same technique we use for other external programs and that is to search a number of typical paths first before giving up trying to load the drivetemp module and not rely solely upon the command being found in the current $PATH.

Firminator commented 2 years ago

nice find