Skip to content

Commit

Permalink
Stop setting up sudoers file automatically
Browse files Browse the repository at this point in the history
This should now be performed by the user since Kano no longer allows
running python passwordless with sudo.
  • Loading branch information
mandre committed Mar 16, 2020
1 parent 7c5bd11 commit 4a5d9b7
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions pull_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,6 @@ def copy_mo_file(project, podir, lang):
% (os.path.join("/tmp", mo_file), lang, mo_file))


def copy_sudoers_file():
print("Copying sudoers files")
scp.put(os.path.join(os.path.dirname(os.path.realpath(__file__)),
"sudoers.conf"),
os.path.join("/tmp", "sudoers.conf"))
# Kano let's us use python with sudo passwordless, let's use it to our
# advantage to move our sudoers file to /etc/sudoers.d
ssh.exec_command("sudo python -c 'import os; os.rename(\"%s\", \"%s\")'" %
(os.path.join("/tmp", "sudoers.conf"),
os.path.join("/etc", "sudoers.d", "kano-i18n-sync_conf"))
)
ssh.exec_command("sudo python -c 'import os; os.chown(\"%s\", 0, 0)'" %
os.path.join("/etc", "sudoers.d", "kano-i18n-sync_conf"))


def generate_lua_dict(project, podir, lang):
print("Generate lua dict for %s" % project['name'])
pofile = os.path.join(podir, "%s.po" % lang)
Expand Down Expand Up @@ -155,8 +140,6 @@ def copy_kano_overworld_file(project, podir, lang):

scp = ssh.open_sftp()

copy_sudoers_file()

lang = args.lang

with open("kano-projects.yaml", 'r') as projects_file:
Expand Down

0 comments on commit 4a5d9b7

Please sign in to comment.