summaryrefslogtreecommitdiff
path: root/host-control
diff options
context:
space:
mode:
authorPaul Kocialkowski2023-02-08 14:14:11 +0100
committerPaul Kocialkowski2023-02-08 14:14:32 +0100
commite32196f716343e392f6159a2b740056fd1e57e27 (patch)
treecbb6f57a5b6b0c76b4ebeb20839a44eced31468b /host-control
parentc2bb38102286b56e60afdee13c1430c0ba994e26 (diff)
host-control: Rework system update with hook
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'host-control')
-rwxr-xr-xhost-control10
1 files 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)