From dd839790807f182744a914c3b99e0bd8f84fd8b3 Mon Sep 17 00:00:00 2001 From: Qubad786 Date: Tue, 24 Jun 2025 17:50:50 +0500 Subject: [PATCH] Enable smartmontools service on fresh install (#880) --- truenas_install/__main__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/truenas_install/__main__.py b/truenas_install/__main__.py index 1dccf6f..9a0dc2e 100644 --- a/truenas_install/__main__.py +++ b/truenas_install/__main__.py @@ -502,6 +502,11 @@ def main(): # Copy all files from ISO's data to new root's data (only includes .vendor right now) run_command(["cp", "-r", "/data/.", f"{root}/data/"]) + # This is fresh install, at this point we need to make sure smartmontools is enabled + # because that is the case in database and we have smartd preset as disabled which means + # that it won't auto-start despite database claiming it is enabled + run_command(["chroot", root, "systemctl", "enable", "smartmontools"], check=False) + # We only want /data itself (without contents) and /data/subsystems to be 755 # whereas everything else should be 700 # Doing this here is important so that we cover both fresh install and upgrade case