diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2018-05-27 07:24:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2018-05-27 08:55:24 +0000 |
commit | 5e1ac4373414852fafc23f6250126bd4a2c1147a (patch) | |
tree | fb8e49939c7495595977d1a48b4b04d0b661af98 | |
parent | Updating documentation for multiple commands in a row. (diff) | |
download | compute-tools-5e1ac4373414852fafc23f6250126bd4a2c1147a.tar.xz compute-tools-5e1ac4373414852fafc23f6250126bd4a2c1147a.zip |
Calling shell in container enter command directly, replacing container-nsenter helper program.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | bin/container-nsenter | 24 | ||||
-rwxr-xr-x | lib/container/enter | 9 |
2 files changed, 1 insertions, 32 deletions
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 <daniel.baumann@open-infrastructure.net> -# -# 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 <http://www.gnu.org/licenses/>. - -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}" |