this is missing
This commit is contained in:
parent
c9c0b3e6ff
commit
8993ccdf66
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user