crosvm/tools/impl/dev_container/entrypoint.sh
Dennis Kempin b28d5a963d Fix winetricks install and build new container
Uprevs the container version to include the newly added
winetricks.

Fixes /dev/kvm permissions.

BUG=None
TEST=CQ

Change-Id: I019178f103068d3ae0dc048180a14c8786e738e0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3994884
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-11-01 19:04:35 +00:00

19 lines
515 B
Bash
Executable file

#!/usr/bin/env bash
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Ensure there's only 1 instance of setup-user.sh running
flock /tmp/entrypoint_lock /tools/setup-user.sh
# Give KVM device correct permission
if [ -e "/dev/kvm" ]; then
chmod 666 /dev/kvm
fi
# Run provided command or interactive shell
if [[ $# -eq 0 ]]; then
sudo -u crosvmdev /bin/bash -l
else
sudo -u crosvmdev /bin/bash -l -c "$*"
fi