Skip to content

Commit d89e8bd

Browse files
committed
make chrome workaround conditional, doc it
1 parent db00a4d commit d89e8bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

_scripts/snapshot.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ WORKDIR=$(readlink -f ./_snapshot-workdir)
2626
echo "SITE_ABS=$SITE_ABS"
2727
echo "MAX_TRIES=${MAX_TRIES:=5}"
2828

29-
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
29+
# workaround for https://github.com/uazo/cromite/issues/1241
30+
if [[ -f /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]]; then
31+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
32+
fi
3033

3134
if [[ ! -d "$SITE_ABS" ]]; then
3235
echo "site directory does not exist: $SITE_ABS"

0 commit comments

Comments
 (0)