Skip to content

Commit

Permalink
containers/ws: Eliminate /container/target-namespace link
Browse files Browse the repository at this point in the history
We can just do this directly in label-run.
  • Loading branch information
martinpitt committed Jun 27, 2022
1 parent 0b06e80 commit d5f549a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion containers/ws/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ fi
rm -rf /container/rpms || true

# And the stuff that starts the container
ln -s /host/proc/1 /container/target-namespace
chmod -v +x /container/label-install /container/label-uninstall /container/label-run
3 changes: 2 additions & 1 deletion containers/ws/label-run
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ if [ -d /host ]; then
fi

# And run cockpit-ws
exec /usr/bin/nsenter --net=/container/target-namespace/ns/net --uts=/container/target-namespace/ns/uts -- /usr/libexec/cockpit-ws --local-ssh "$@"
TARGET_NS=/host/proc/1/ns
exec /usr/bin/nsenter --net=$TARGET_NS/net --uts=$TARGET_NS/uts -- /usr/libexec/cockpit-ws --local-ssh "$@"
else
# unprivileged mode

Expand Down

0 comments on commit d5f549a

Please sign in to comment.