[lxc-devel] [lxd-pkg-snap/latest-edge] don't change path in lxc wrapper

albertodonato on Github lxc-bot at linuxcontainers.org
Thu Oct 12 07:19:31 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 363 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20171012/5a5f89ec/attachment.bin>
-------------- next part --------------
From 2cec23f8015f4aba44916ff6df379eb5106b35d2 Mon Sep 17 00:00:00 2001
From: Alberto Donato <alberto.donato at gmail.com>
Date: Wed, 11 Oct 2017 11:16:57 +0200
Subject: [PATCH] don't change path in lxc wrapper

Signed-off-by: Alberto Donato <alberto.donato at gmail.com>
---
 snapcraft/wrappers/lxc | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/snapcraft/wrappers/lxc b/snapcraft/wrappers/lxc
index f01684d..9d0e84b 100755
--- a/snapcraft/wrappers/lxc
+++ b/snapcraft/wrappers/lxc
@@ -6,15 +6,6 @@ if [ -d /sys/kernel/security/apparmor ] && [ "$(cat /proc/self/attr/current)" !=
     exec aa-exec -p unconfined -- "$0" "$@"
 fi
 
-# Move to the right directory
-PWD=$(pwd)
-if [ "${PWD}" = "/var/lib/snapd/void" ]; then
-    PWD="$(readlink -f "/proc/${PPID}/cwd" || true)"
-fi
-if [ -n "${PWD}" ]; then
-    cd "/var/lib/snapd/hostfs/${PWD}" 2>/dev/null || true
-fi
-
 # Set the environment
 export LXD_DIR=${SNAP_COMMON}/lxd/
 export EDITOR=vim.tiny


More information about the lxc-devel mailing list