This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
FREAX/bin/tpm-repair
2022-07-18 19:33:40 +02:00

14 lines
No EOL
482 B
Text

if not security.getSU() then
exception.throw("RestrictedOpsException")
return
end
if not config.load("/etc/tpm/packageInstalled.dat") then
kerneldraw.printAppInfo("tpm", "packageInstalled.dat is missing or corrupt")
if kerneldraw.request("Repair TPM data files") then
config.save({}, "/etc/tpm/packageInstalled.dat")
kerneldraw.printAppInfo("tpm", "Package registry reconstructed")
end
else
kerneldraw.printAppInfo("tpm", "packageInstalled.dat is correctly readable")
end