Sandro Bonazzola has posted comments on this change. Change subject: packaging: setup: use ssh public key for allinone ......................................................................
Patch Set 10: (2 comments) .................................................... File packaging/setup/plugins/ovirt-engine-setup/all-in-one/sshd.py Line 95: Line 96: already_in_file = False Line 97: content = [] Line 98: if os.path.exists(authorized_keys_file): Line 99: with open(authorized_keys_file, 'r') as f: why not just content = f.read().splitlines() and if authorized_keys_line in content avoiding already_in_file variable? Line 100: for line in f.read().splitlines(): Line 101: content.append(line) Line 102: if line == authorized_keys_line: Line 103: already_in_file = True Line 113: filetransaction.FileTransaction( Line 114: name=authorized_keys_file, Line 115: content=content, Line 116: mode=0o600, Line 117: owner=self.environment[osetupcons.SystemEnv.USER_ROOT], you're using ~root as home directory, you should either use root as user here as well or use ~%s % self.environment[osetupcons.SystemEnv.USER_ROOT] as home directory. Line 118: enforcePermissions=True, Line 119: modifiedList=self.environment[ Line 120: otopicons.CoreEnv.MODIFIED_FILES Line 121: ], -- To view, visit http://gerrit.ovirt.org/17996 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I885894bba4c998e5dd3e9b2fd4da61d833f7a3a1 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches