From 6f119cd9dc8165447d69d4e2058b4239036a267a Mon Sep 17 00:00:00 2001 From: Kobi Date: Thu, 1 Sep 2022 09:10:14 +0300 Subject: [PATCH 1/2] Add correct parameter handling for start-ubuntu.sh The existing version does not actually accept parameters to run commands in the container without having to login first, even though it should. EG `./start-ubuntu.sh "whoami"` should output `root`. The current fix will allow these commands to actually work. It should be changed across all of the install scripts for the modded OSespecially, which I do not have access to. --- Installer/Ubuntu/ubuntu.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Installer/Ubuntu/ubuntu.sh b/Installer/Ubuntu/ubuntu.sh index c5c8c358..f511d59b 100644 --- a/Installer/Ubuntu/ubuntu.sh +++ b/Installer/Ubuntu/ubuntu.sh @@ -64,14 +64,13 @@ command+=" HOME=/root" command+=" PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games" command+=" TERM=\$TERM" command+=" LANG=C.UTF-8" -command+=" /bin/bash --login" -com="\$@" -if [ -z "\$1" ];then - exec \$command +command+=" /bin/bash" +if [[ -z \$1 ]];then + command+=" --login" else - \$command -c "\$com" + command+=" -c $@" fi -EOM +exec \$command echo "fixing shebang of $bin" termux-fix-shebang $bin From 06f085d3f0991cda6e9b44b824842b70f8fe29b0 Mon Sep 17 00:00:00 2001 From: Kobi Date: Mon, 12 Sep 2022 15:00:10 +0300 Subject: [PATCH 2/2] Update ubuntu.sh added missing EOM --- Installer/Ubuntu/ubuntu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Installer/Ubuntu/ubuntu.sh b/Installer/Ubuntu/ubuntu.sh index f511d59b..677e900f 100644 --- a/Installer/Ubuntu/ubuntu.sh +++ b/Installer/Ubuntu/ubuntu.sh @@ -71,6 +71,7 @@ else command+=" -c $@" fi exec \$command +EOM echo "fixing shebang of $bin" termux-fix-shebang $bin