From 4d888d97843583127abea05ad9fdfa464d52b92d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 15 Nov 2024 19:38:54 +0100 Subject: [PATCH] =?UTF-8?q?=E2=88=92main=5Fenv=5Froot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/main.sh | 4 ---- shell/rescue/common.sh | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/shell/main.sh b/shell/main.sh index 7925a6f..c8d2607 100644 --- a/shell/main.sh +++ b/shell/main.sh @@ -1,9 +1,5 @@ [ -n "${ENV}" ] || export ENV="/etc/shell/main.sh" -main_env_root() { - dirname "${ENV}" -} - main_link_bashrc() { local file="/etc/bash.bashrc" rm --force "${file}" diff --git a/shell/rescue/common.sh b/shell/rescue/common.sh index 49a9305..f33c5aa 100644 --- a/shell/rescue/common.sh +++ b/shell/rescue/common.sh @@ -66,11 +66,11 @@ rescue_upload() { "${user_host}" # upload root rsync --delete --recursive \ - "$(main_env_root)" "${user_host}:/etc" + "$(dirname "${ENV}")" "${user_host}:/etc" # call setup # TODO variable - ssh "${user_host}" -- "\ -. \"/etc/bash/main.sh\" ; rescue_configure \"${hostname}\"" + ssh "${user_host}" -- \ + ". \"${ENV}\" ; rescue_configure \"${hostname}\"" # create session ssh "${user_host}" -- byobu new-session -d # send keys