diff options
author | Paul Kocialkowski | 2023-02-08 14:13:50 +0100 |
---|---|---|
committer | Paul Kocialkowski | 2023-02-08 14:14:32 +0100 |
commit | c2bb38102286b56e60afdee13c1430c0ba994e26 (patch) | |
tree | 31c0dc271ee1ca07bccd68c4e629216ad7e6ed04 | |
parent | 64b851d924d1db85748b76b7dd2d95c6a84de41d (diff) |
host-control: Add system initramfs update support
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rwxr-xr-x | host-control | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/host-control b/host-control index c9e0cb0..a7c3505 100755 --- a/host-control +++ b/host-control @@ -27,6 +27,7 @@ class host_control(): " system-ping ping host system\n" \ " system-update update system\n" \ " system-restart restart system\n" \ + " system-initramfs-update update system initramfs\n" \ " system-daemon-status show systemd status\n" \ " system-daemon-log show systemd log\n" \ " system-daemon-reload reload systemd units\n" \ @@ -401,6 +402,22 @@ class host_control(): self.print_command(command) subprocess.call(command) + def system_initramfs_update(self, host): + address = self.ssh_address(host) + + hook = self.hook_lookup(host, "initramfs-update") + if hook == None: + return 1 + + arguments = self.hook_command(hook) + if arguments == None: + return 1 + + command = self.ssh_command(address, arguments) + + self.print_command(command) + subprocess.call(command) + def system_daemon_status(self, host): address = self.ssh_address(host) arguments = [ "SYSTEMD_COLORS=1", "systemctl", "status" ] @@ -498,6 +515,8 @@ class host_control(): return self.system_update(host) elif action == "system-restart": return self.system_restart(host) + elif action == "system-initramfs-update": + return self.system_initramfs_update(host) elif action == "system-daemon-status": return self.system_daemon_status(host) elif action == "system-daemon-log": |