Detect VyOS based on /etc/issue (support 1.0.5) (#20221)

* Detect VyOS based on /etc/issue (support 1.0.5)

VyOS didn't contain `vyos` in `/proc/version`

* Update vyos.py
This commit is contained in:
John R Barker 2017-01-25 14:47:56 +00:00 committed by GitHub
parent a43534a4a8
commit e1b1df3cb1

View file

@ -50,7 +50,7 @@ class TerminalModule(TerminalBase):
@staticmethod
def guess_network_os(conn):
stdin, stdout, stderr = conn.exec_command('cat /proc/version')
if 'vyos' in stdout.read():
stdin, stdout, stderr = conn.exec_command('cat /etc/issue')
if 'VyOS' in stdout.read():
return 'vyos'