* [PATCH 1/2] smartmontools: Add update of drive database
@ 2025-04-07 12:53 Adolf Belka
2025-04-07 12:53 ` [PATCH 2/2] core194: Ship smartmontools Adolf Belka
0 siblings, 1 reply; 2+ messages in thread
From: Adolf Belka @ 2025-04-07 12:53 UTC (permalink / raw)
To: development; +Cc: Adolf Belka
- Existing install uses database provide with source tarball. The database is also
updated on a periodic basis which can vary between a few weeks up to 6 months or so.
- The last release was back in Aug 2023 so the database all users will have is quite old.
- This patch adds a script into the monthly fcron directory that will run the
update-smart-drivedb script from the smartmontools installation. This script downloads
the database file via https and also checks the signature of the file to ensure that
it has not been changed in any way. The script is run with the -q (quiet) option.
The script checks if the downloaded database is corrupted ands will not install it if
it is corrupted. It checks if the database has changed since the last version
installed on the system. If not changed it does not replace the file.
- Tested this out with my production IPFire system and I ended up with the latest
database from 3 weeks ago.
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
config/rootfiles/common/smartmontools | 1 +
config/smartmontools/fcron.monthly | 5 +++++
lfs/smartmontools | 7 ++++++-
3 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 config/smartmontools/fcron.monthly
diff --git a/config/rootfiles/common/smartmontools b/config/rootfiles/common/smartmontools
index 6b3f923b1..0f72814f4 100644
--- a/config/rootfiles/common/smartmontools
+++ b/config/rootfiles/common/smartmontools
@@ -30,3 +30,4 @@ usr/sbin/update-smart-drivedb
#usr/share/man/man8/update-smart-drivedb.8
#usr/share/smartmontools
usr/share/smartmontools/drivedb.h
+etc/fcron.monthly/smart-drivedb
diff --git a/config/smartmontools/fcron.monthly b/config/smartmontools/fcron.monthly
new file mode 100644
index 000000000..6561cd081
--- /dev/null
+++ b/config/smartmontools/fcron.monthly
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+/usr/sbin/update-smart-drivedb -q
+
+exit 0
diff --git a/lfs/smartmontools b/lfs/smartmontools
index 3e81181fc..61a5ea881 100644
--- a/lfs/smartmontools
+++ b/lfs/smartmontools
@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2025 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -74,5 +74,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && ./configure --prefix=/usr
cd $(DIR_APP) && make BUILD_INFO='"($(NAME) $(VERSION))"' $(MAKETUNING)
cd $(DIR_APP) && make install
+
+ # Install cron job.
+ install -m 754 -v $(DIR_CONF)/smartmontools/fcron.monthly \
+ /etc/fcron.monthly/smart-drivedb
+
@rm -rf $(DIR_APP)
@$(POSTBUILD)
--
2.49.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] core194: Ship smartmontools
2025-04-07 12:53 [PATCH 1/2] smartmontools: Add update of drive database Adolf Belka
@ 2025-04-07 12:53 ` Adolf Belka
0 siblings, 0 replies; 2+ messages in thread
From: Adolf Belka @ 2025-04-07 12:53 UTC (permalink / raw)
To: development; +Cc: Adolf Belka
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
config/rootfiles/core/194/filelists/smartmontools | 1 +
1 file changed, 1 insertion(+)
create mode 120000 config/rootfiles/core/194/filelists/smartmontools
diff --git a/config/rootfiles/core/194/filelists/smartmontools b/config/rootfiles/core/194/filelists/smartmontools
new file mode 120000
index 000000000..fb66dafef
--- /dev/null
+++ b/config/rootfiles/core/194/filelists/smartmontools
@@ -0,0 +1 @@
+../../../common/smartmontools
\ No newline at end of file
--
2.49.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-07 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-07 12:53 [PATCH 1/2] smartmontools: Add update of drive database Adolf Belka
2025-04-07 12:53 ` [PATCH 2/2] core194: Ship smartmontools Adolf Belka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox