Skip to content

Commit 83f8736

Browse files
committed
updated getent.py
1 parent 67edca5 commit 83f8736

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

getent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def run(self):
9999
elif operating_system == 'Linux':
100100
log.info('detected system as Linux')
101101
log.info('calling %s %s', command, args_string)
102-
sys.exit(subprocess.call(command, args, shell=False))
102+
sys.exit(subprocess.call(['getent', command] + args, shell=False))
103103
else:
104104
die("operating system '{operating_system}' is not one of the supported Linux or Darwin (Mac)"\
105105
.format(operating_system=operating_system))
@@ -111,10 +111,10 @@ def mac_getent(self, command, args):
111111
# elif command == 'group':
112112
# (output, returncode) = self.cmd(command, args)
113113
# formatted_output = self.mac_getent_group(output)
114-
# elif command == 'host':
114+
# elif command == 'hosts':
115115
# (output, returncode) = self.cmd(command, args)
116116
# formatted_output = self.mac_getent_host(output)
117-
if command in ('passwd', 'group'): #, 'host'):
117+
if command in ('passwd', 'group'): #, 'hosts'):
118118
# might be too clever to dynamically determine the method to reduce code dup
119119
(formatted_output, returncode) = getattr(self, 'mac_getent_{command}'.format(command=command))(args)
120120
else:

0 commit comments

Comments
 (0)