mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Further update to support correct tail in network for Solaris
This commit is contained in:
parent
5b6d33dd70
commit
90e6a1d8f6
1 changed files with 6 additions and 2 deletions
|
@ -484,8 +484,12 @@ def _netstat_route_sunos():
|
|||
'''
|
||||
Return netstat routing information for SunOS
|
||||
'''
|
||||
tailpath = '/usr/xpg4/bin/tail'
|
||||
if not os.path.exists(tailpath):
|
||||
return 'required version of command tail does not exist: {0}'.format(tailpath)
|
||||
|
||||
ret = []
|
||||
cmd = 'netstat -f inet -rn | tail -n+5'
|
||||
cmd = 'netstat -f inet -rn | {0} -n +5'.format(tailpath)
|
||||
out = __salt__['cmd.run'](cmd, python_shell=True)
|
||||
for line in out.splitlines():
|
||||
comps = line.split()
|
||||
|
@ -496,7 +500,7 @@ def _netstat_route_sunos():
|
|||
'netmask': '',
|
||||
'flags': comps[2],
|
||||
'interface': comps[5] if len(comps) >= 6 else ''})
|
||||
cmd = 'netstat -f inet6 -rn | tail -n+5'
|
||||
cmd = 'netstat -f inet6 -rn | {0} -n +5'.format(tailpath)
|
||||
out = __salt__['cmd.run'](cmd, python_shell=True)
|
||||
for line in out.splitlines():
|
||||
comps = line.split()
|
||||
|
|
Loading…
Add table
Reference in a new issue