Skip to content

Commit

Permalink
Fixes issue #54: add -f for hostname cmd (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-bednar authored Jun 22, 2016
1 parent b6ea845 commit 493c16c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rrmngmnt/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_hostname(self):
:return: hostname
:rtype: string
"""
rc, out, _ = self._m.runCmd(['hostname'])
rc, out, _ = self._m.runCmd(['hostname', '-f'])
if rc:
return None
return out.strip()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class TestHostNameEtc(object):

data = {
'which hostnamectl': (1, '', ''),
'hostname': (0, 'local', ''),
'hostname -f': (0, 'local', ''),
'hostname something ; sed -i -e /^HOSTNAME/d /etc/sysconfig/network '
'&& echo HOSTNAME=something >> /etc/sysconfig/network': (0, '', ''),
}
Expand Down

0 comments on commit 493c16c

Please sign in to comment.