−main_env_root
This commit is contained in:
parent
bc7b4962f6
commit
4d888d9784
2 changed files with 3 additions and 7 deletions
|
@ -1,9 +1,5 @@
|
||||||
[ -n "${ENV}" ] || export ENV="/etc/shell/main.sh"
|
[ -n "${ENV}" ] || export ENV="/etc/shell/main.sh"
|
||||||
|
|
||||||
main_env_root() {
|
|
||||||
dirname "${ENV}"
|
|
||||||
}
|
|
||||||
|
|
||||||
main_link_bashrc() {
|
main_link_bashrc() {
|
||||||
local file="/etc/bash.bashrc"
|
local file="/etc/bash.bashrc"
|
||||||
rm --force "${file}"
|
rm --force "${file}"
|
||||||
|
|
|
@ -66,11 +66,11 @@ rescue_upload() {
|
||||||
"${user_host}"
|
"${user_host}"
|
||||||
# upload root
|
# upload root
|
||||||
rsync --delete --recursive \
|
rsync --delete --recursive \
|
||||||
"$(main_env_root)" "${user_host}:/etc"
|
"$(dirname "${ENV}")" "${user_host}:/etc"
|
||||||
# call setup
|
# call setup
|
||||||
# TODO variable
|
# TODO variable
|
||||||
ssh "${user_host}" -- "\
|
ssh "${user_host}" -- \
|
||||||
. \"/etc/bash/main.sh\" ; rescue_configure \"${hostname}\""
|
". \"${ENV}\" ; rescue_configure \"${hostname}\""
|
||||||
# create session
|
# create session
|
||||||
ssh "${user_host}" -- byobu new-session -d
|
ssh "${user_host}" -- byobu new-session -d
|
||||||
# send keys
|
# send keys
|
||||||
|
|
Loading…
Reference in a new issue