Lines Matching refs:cmd
127 def command_judge(cmd): argument
129 cmd_parts = cmd.split()
130 if 'file send' in cmd and cmd[:9] == 'file send' and len(cmd_parts) == 4:
132 if 'file recv' in cmd and cmd[:9] == 'file recv' and len(cmd_parts) == 4:
134 if 'install' in cmd and cmd[:7] == 'install' and len(cmd_parts) == 2:
139 def command_callback(cmd, head, need_del, res=""): argument
140 cmd_parts = cmd.split()
141 if 'file send' in cmd and cmd[:9] == 'file send' and len(cmd_parts) == 4:
145 if 'file recv' in cmd and cmd[:9] == 'file recv' and len(cmd_parts) == 4:
149 if 'install' in cmd and cmd[:7] == 'install' and len(cmd_parts) == 2:
151 if cmd == 'smode':
154 if cmd == 'smode -r':
157 if cmd == 'target boot':
262 cmd = "{}{}".format(server_head, "-m")
263 print(cmd)
264 os.popen(cmd)
267 def run_command(cmd, head=NORMAL_HEAD, need_del=True, need_callback=True): argument
268 command = "{}{}".format(head, cmd)
275 command_callback(cmd, head, need_del)
278 def run_command_stdout(cmd, head=NORMAL_HEAD, need_del=True, need_callback=True): argument
279 command = "{}{}".format(head, cmd)
280 if head != '' and 'echo' not in cmd:
290 command_callback(cmd, head, need_del, res)