this is missing

This commit is contained in:
Robin Müller 2023-04-14 00:08:28 +02:00
parent c9c0b3e6ff
commit 8993ccdf66
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
1 changed files with 7 additions and 7 deletions

View File

@ -211,24 +211,24 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
add_xsc_reboot_cmd(q=q, reboot_self=True)
elif op_code == OpCode.SYSTEMCTL_CMD_EXECUTOR:
print("systemctl command types: ")
for idx, v in enumerate(SystemctlCmd):
print(f"{idx}: {v}")
systemctl_cmd = SystemctlCmd(int(input("Specify systemctl command type: ")))
for entry in SystemctlCmd:
print(f"{entry}: {entry.name}")
systemctl_cmd = SystemctlCmd(int(input("Specify systemctl command type by key: ")))
unit_name = input("Specify unit name: ")
cmd_data = bytearray([systemctl_cmd])
cmd_data.extend(unit_name.encode())
create_action_cmd(
q.add_pus_tc(create_action_cmd(
object_id=CORE_CONTROLLER_ID,
action_id=ActionId.SYSTEMCTL_CMD_EXECUTOR,
user_data=cmd_data
)
))
elif op_code in OpCode.EXECUTE_SHELL_CMD_BLOCKING:
custom_cmd = input("Please specify command to execute: ")
create_action_cmd(
q.add_pus_tc(create_action_cmd(
object_id=CORE_CONTROLLER_ID,
action_id=ActionId.EXECUTE_SHELL_CMD_BLOCKING,
user_data=custom_cmd.encode()
)
))
elif op_code in OpCode.XSC_REBOOT_0_0:
add_xsc_reboot_cmd(
q=q, reboot_self=False, chip=Chip.CHIP_0, copy=Copy.COPY_0_NOM