ruinst et rwoinst: piloter l'interaction distante à partir du paramétrage local

This commit is contained in:
Jephté Clain 2017-03-09 13:23:59 +04:00
parent e9b574d83d
commit 8a6678cc0c
2 changed files with 14 additions and 2 deletions

8
ruinst
View File

@ -270,6 +270,11 @@ if [ -n "$make_archive" ]; then
fi fi
## Déploiement ## Déploiement
# sur l'hôte distant, ne rendre interactif qu'à partir de -yy
rinteraction=$__interaction
[ $rinteraction -lt 2 ] && rinteraction=$(($rinteraction + 1))
for host in "${hosts[@]}"; do for host in "${hosts[@]}"; do
if [ "$host" == "localhost" ]; then if [ "$host" == "localhost" ]; then
etitle -s "Déploiement sur l'hôte local" etitle -s "Déploiement sur l'hôte local"
@ -288,9 +293,10 @@ for host in "${hosts[@]}"; do
scp -S "$SSH" "$archive" "$user@$host:" || die scp -S "$SSH" "$archive" "$user@$host:" || die
estep "Lancement du script de déploiement" estep "Lancement du script de déploiement"
"$SSH" -qt "$user@$host" "\ "$SSH" -qt "$user@$host" "\
__interaction=$rinteraction
__estack=$(qval "$__estack") __estack=$(qval "$__estack")
__tlevel=$(qval "$__tlevel") __tlevel=$(qval "$__tlevel")
export __estack __tlevel export __interaction __estack __tlevel
${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG ${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG
}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- MYHOST="$host" "$@")" }$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- MYHOST="$host" "$@")"
eend eend

View File

@ -242,6 +242,11 @@ etitle "Création de l'archive pour le déploiement" \
"$scriptdir/mkusfx" --bare --tmp-archive -o "$archive" "$workdir" -- ./woinst --is-tmpdir "${bundles[@]}" || die "$scriptdir/mkusfx" --bare --tmp-archive -o "$archive" "$workdir" -- ./woinst --is-tmpdir "${bundles[@]}" || die
## Déploiement ## Déploiement
# sur l'hôte distant, ne rendre interactif qu'à partir de -yy
rinteraction=$__interaction
[ $rinteraction -lt 2 ] && rinteraction=$(($rinteraction + 1))
for host in "${hosts[@]}"; do for host in "${hosts[@]}"; do
if [ "$host" == "localhost" ]; then if [ "$host" == "localhost" ]; then
etitle "Déploiement sur l'hôte local" \ etitle "Déploiement sur l'hôte local" \
@ -259,9 +264,10 @@ for host in "${hosts[@]}"; do
scp -S "$SSH" "$archive" "$user@$host:" || die scp -S "$SSH" "$archive" "$user@$host:" || die
estep "Lancement du script de déploiement" estep "Lancement du script de déploiement"
"$SSH" -qt "$user@$host" "\ "$SSH" -qt "$user@$host" "\
__interaction=$rinteraction
__estack=$(qval "$__estack") __estack=$(qval "$__estack")
__tlevel=$(qval "$__tlevel") __tlevel=$(qval "$__tlevel")
export __estack __tlevel export __interaction __estack __tlevel
${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG ${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG
}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- MYHOST="$host" "$@")" }$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- MYHOST="$host" "$@")"
eend eend