From 5e1ac4373414852fafc23f6250126bd4a2c1147a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 27 May 2018 09:24:43 +0200 Subject: Calling shell in container enter command directly, replacing container-nsenter helper program. Signed-off-by: Daniel Baumann --- bin/container-nsenter | 24 ------------------------ lib/container/enter | 9 +-------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100755 bin/container-nsenter diff --git a/bin/container-nsenter b/bin/container-nsenter deleted file mode 100755 index a12bb0d..0000000 --- a/bin/container-nsenter +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann -# -# SPDX-License-Identifier: GPL-3.0+ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -set -e - -# Run -script -c "/bin/bash -l" -q /dev/null diff --git a/lib/container/enter b/lib/container/enter index faf5d35..f7551fe 100755 --- a/lib/container/enter +++ b/lib/container/enter @@ -104,14 +104,7 @@ do done # Run -if [ -e "${MACHINES}/${NAME}/usr/bin/container-nsenter" ] -then - OPTIONS="/usr/bin/container-nsenter" -else - OPTIONS="" -fi - -nsenter --target ${LEADER} --mount --uts --ipc --net --pid --root --wd=/root ${OPTIONS} +nsenter --target ${LEADER} --mount --uts --ipc --net --pid --root --wd=/root /usr/bin/script -c "/bin/bash -l" -q /dev/null # Post hooks for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" -- cgit v1.2.3