From fd697274a3c192ab44c8f0144488577ae1d46432 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 12 Sep 2018 14:57:38 +0200 Subject: [PATCH] Use a lighter PID 1 than $SHELL When used as PID 1, /bin/sh takes 3248 kB compared to the 4136 kB taken by /bin/bash. It's not a lot, but is memory that can be saved for free. As a nice side-effect, this unbreaks 'create' with podman-0.9.1 because 'podman create ...' doesn't work without a command. https://github.com/containers/libpod/issues/1452 --- fedora-toolbox | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fedora-toolbox b/fedora-toolbox index a918ed484..c21cef318 100755 --- a/fedora-toolbox +++ b/fedora-toolbox @@ -97,7 +97,8 @@ create() --tty \ --volume $HOME:$HOME \ --volume $XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR \ - $toolbox_image >/dev/null 2>&42; then + $toolbox_image \ + /bin/sh >/dev/null 2>&42; then echo "$0: failed to create container $toolbox_container" exit 1 fi