From e32196f716343e392f6159a2b740056fd1e57e27 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Wed, 8 Feb 2023 14:14:11 +0100 Subject: host-control: Rework system update with hook Signed-off-by: Paul Kocialkowski --- host-control | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/host-control b/host-control index a7c3505..a7c8716 100755 --- a/host-control +++ b/host-control @@ -385,8 +385,14 @@ class host_control(): def system_update(self, host): address = self.ssh_address(host) - # TODO: Move update command in config. - arguments = [ "apt", "update", "&&", "apt", "upgrade" ] + + hook = self.hook_lookup(host, "system-update") + if hook == None: + return 1 + + arguments = self.hook_command(hook) + if arguments == None: + return 1 command = self.ssh_command(address, arguments) -- cgit v1.2.3