-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terminal regex udpate to match the terminal prompt in safe mode #134
Conversation
Signed-off-by: Tomas Herfert <herfik>
Codecov Report
@@ Coverage Diff @@
## main #134 +/- ##
==========================================
+ Coverage 87.31% 87.34% +0.02%
==========================================
Files 28 28
Lines 3516 3516
Branches 626 626
==========================================
+ Hits 3070 3071 +1
Misses 313 313
+ Partials 133 132 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Tomas Herfert <herfik>
Hi @felixfontein, this should be the last PR from me for now, unless I find some other issue:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I'll happily review more PRs if you have some :) |
Co-authored-by: Felix Fontein <[email protected]>
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
Hey @therfert thank you for this PR! |
Hi @benedikt-bartscher and @therfert! I'm also interested and getting safe-mode activated. @benedikt-bartscher, did you figure it out? I've been trying to pass '\x18' as a command, but I just get an empty string back and no indication of the safe mode prompt. |
Hi @fractalbrain sadly i never got safe mode working. Maybe i will try it again next month, i need to install some MTK switches again. |
Hey @benedikt-bartscher ! Thanks for responding. I haven't gotten it working yet either. It seems F4 also toggles safe mode, but I couldn't get the ANSI sequence for that to do anything. Just a blank line. I CAN use an ANSI sequence to clear the console (put '\1Bc'). Ah well. I'm having to resign myself to defeat for the moment. |
@benedikt-bartscher - name: Go to Safe mode
community.routeros.command:
commands:
- "\u0018" |
SUMMARY
Updating the regex that matches the terminal prompt for
command
module in safe mode.ISSUE TYPE
COMPONENT NAME
command
ADDITIONAL INFORMATION
Commands are timing out in safe mode now, because the module will never match the terminal prompt which is required in order to recognize the end of the command output.
In order to try the functionality,
CTRL + X
(\x18
) has to be passed as a command to the module.