Merge ~silverdrake11/canonical-identity-provider:multipass-fix into canonical-identity-provider:master

Proposed by Kevin Nasto
Status: Merged
Approved by: Maximiliano Bertacchini
Approved revision: bd85cb1466d2cd2c5996b6bc73e86cb6423cbb5b
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~silverdrake11/canonical-identity-provider:multipass-fix
Merge into: canonical-identity-provider:master
Diff against target: 14 lines (+2/-2)
1 file modified
setup-container (+2/-2)
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+419242@code.launchpad.net

Commit message

Minor fix to allow Multipass (using QEMU) to run ./setup-container in case its needed

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/setup-container b/setup-container
2index d360aee..d6deb73 100755
3--- a/setup-container
4+++ b/setup-container
5@@ -9,8 +9,8 @@ fi
6 # Barf if not in container, to avoid hosing user's system
7 # Note this needs to be run as root (but at this point we should be under
8 # sudo anyway).
9-if ! grep -qa container=lxc /proc/1/environ; then
10- echo "You're not in an LXC container, so I'm refusing to run."
11+if ! grep -qa container=lxc /proc/1/environ && [ "$(cat /sys/class/dmi/id/chassis_vendor)" != QEMU ]; then
12+ echo "You're not in an LXC container or QEMU, so I'm refusing to run."
13 exit
14 fi
15

Subscribers

People subscribed via source and target branches