Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Illyse
Flash Openwrt Mikrotik Rb952ui 5ac2nD
Commits
798ad6b8
Commit
798ad6b8
authored
Dec 27, 2020
by
Félix Sipma
Browse files
typo: oubli d'un shell=True
parent
5cb13e29
Changes
1
Hide whitespace changes
Inline
Side-by-side
flash_openwrt_mikrotik_rb952ui-5ac2nD.py
View file @
798ad6b8
...
...
@@ -52,7 +52,7 @@ subprocess.run("ssh " + SSH_OPT + " admin@" + IP_ROUTEROS + " \"/system license
byteskey
=
subprocess
.
check_output
(
"ssh "
+
SSH_OPT
+
" admin@"
+
IP_ROUTEROS
+
"
\"
/system license print
\"
| grep
\"
software-id:
\"
| sed -r 's/.*software-id: ([[:alnum:]-]+).*/
\\
1/'.key"
,
shell
=
True
)
# ^ TODO: verify if "byteskey" right is the right output
key
=
byteskey
.
decode
(
'utf-8'
)
+
".key"
subprocess
.
run
(
"scp "
+
SSH_OPT
+
" admin@"
+
IP_ROUTEROS
+
":/"
+
key
+
"./"
+
key
)
subprocess
.
run
(
"scp "
+
SSH_OPT
+
" admin@"
+
IP_ROUTEROS
+
":/"
+
key
+
"./"
+
key
,
shell
=
True
)
print
(
BLUE
+
"Configuration du routeur pour le flash"
+
NC
)
subprocess
.
run
(
"ssh "
+
SSH_OPT
+
" admin@"
+
IP_ROUTEROS
+
"
\"
/system routerboard settings set boot-device=try-ethernet-once-then-nand
\"
"
,
shell
=
True
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment