diff options
-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": |