@@ -27,6 +27,7 @@ class BareboxDriver(CommandMixin, Driver, CommandProtocol, LinuxBootProtocol):
2727 interrupt (str): optional, string to interrupt autoboot (use "\x03 " for CTRL-C)
2828 bootstring (regex): optional, regex indicating that the Linux Kernel is booting
2929 password (str): optional, password to use for access to the shell
30+ boot_command (str): optional, boot command to boot target
3031 login_timeout (int): optional, timeout for access to the shell
3132 """
3233 bindings = {"console" : ConsoleProtocol , }
@@ -35,6 +36,7 @@ class BareboxDriver(CommandMixin, Driver, CommandProtocol, LinuxBootProtocol):
3536 interrupt = attr .ib (default = "\x04 " , validator = attr .validators .instance_of (str ))
3637 bootstring = attr .ib (default = r"Linux version \d" , validator = attr .validators .instance_of (str ))
3738 password = attr .ib (default = "" , validator = attr .validators .instance_of (str ))
39+ boot_command = attr .ib (default = "boot -v" , validator = attr .validators .instance_of (str ))
3840 login_timeout = attr .ib (default = 60 , validator = attr .validators .instance_of (int ))
3941
4042 def __attrs_post_init__ (self ):
@@ -213,7 +215,7 @@ def await_boot(self):
213215 self .console .expect (self .bootstring )
214216
215217 @Driver .check_active
216- def boot (self , name : str ):
218+ def boot (self , name : str = "" ):
217219 """Boot the default or a specific boot entry
218220
219221 Args:
@@ -224,4 +226,4 @@ def boot(self, name: str):
224226 if name :
225227 self .console .sendline (f"boot -v { name } " )
226228 else :
227- self .console .sendline ("boot -v" )
229+ self .console .sendline (self . boot_command )
0 commit comments