updated per capveg suggestions

This commit is contained in:
Steven Noble
2016-02-02 23:23:36 +00:00
parent 1e21a2350b
commit a937106585

View File

@@ -159,11 +159,9 @@ logger.debug("checking if qemu-ppc exists")
if os.path.isfile("/proc/sys/fs/binfmt_misc/qemu-ppc"):
logger.debug("qemu-ppc already exists")
else:
if os.path.ismount("/proc/sys/fs/binfmt_misc"):
execute("sudo /etc/init.d/binfmt-support start", "The binfmt-support service could not be started.")
else:
execute("sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc", "The binfmt_misc system could not be mounted.")
execute("sudo /etc/init.d/binfmt-support start", "The binfmt-support service could not be started.")
if not os.path.ismount("/proc/sys/fs/binfmt_misc"):
execute("sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc", "The binfmt_misc system could not be mounted.")
execute("sudo /etc/init.d/binfmt-support start", "The binfmt-support service could not be started.")
# Fixme: change this to os.execvp()
c = "/usr/bin/sudo -E -u %s %s" % (g_user.name, " ".join(ops.command))