'Client update for rpm based distros.
Upgrading rpms is a bit more tricky than upgrading deb packages since there
is a preinstall script that kills the running GRR daemon and, thus, also
the installer process. We need to make sure we detach the child process
properly and therefore cannot use client_utils_common.Execute().
Args:
path: Path to the .rpm.'

def _InstallRpm(self, path):

    pid = os.fork()
    if (pid == 0):
        cmd = '/bin/rpm'
        cmd_args = [cmd, '-U', '--replacepkgs', '--replacefiles', path]
        env = os.environ.copy()
        env.pop('LD_LIBRARY_PATH', None)
        env.pop('PYTHON_PATH', None)
        os.execve(cmd, cmd_args, env)
    else:
        time.sleep(1000)
