From 674904f5aa4178dd6c19d9e1964c9a22f7a9de76 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 14 Jul 2016 12:56:46 +0200 Subject: update-me neu --- update-all.in | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'update-all.in') diff --git a/update-all.in b/update-all.in index d1cf12b..76261dc 100644 --- a/update-all.in +++ b/update-all.in @@ -1,35 +1,18 @@ #!/bin/bash # update-all version #VERSION# - -declare -A updateCmds -declare -A hasSudo - -updateCmds["arch"]="pacman -Syu;pacdiff" -updateCmds["crux"]="ports -u;prt-get sysup;rejmerge" -updateCmds["debian"]="aptitude update;aptitude safe-upgrade;aptitude dist-upgrade" +# updates all clients defined in #ETCDIR#/update-all.conf via local versions of update-me . #ETCDIR#/update-all.conf -for systemTyp in "${!updateCmds[@]}" +for system in "${systems[@]}" do - eval "system=(\${${systemTyp}Systems[@]})" - for s in "${system[@]}" - do - if [ "$s" == "localhost" ] - then - conCmd="bash -c" - else - conCmd="ssh -t -t $s" - fi - uCmd="${updateCmds["${systemTyp}"]}" - if [ -n "${hasSudo["${s}"]}" ] - then - uCmd="sudo ${uCmd//;/ && sudo }" - else - uCmd="su -c \"${uCmd//;/ && }\"" - fi - uCmd="${uCmd} && echo 'fertig' || echo 'fehlgeschlagen'; read s" - urxvt -e ${conCmd} "hostname; ${uCmd}" & - done + if [ "${system}" == "localhost" ] + then + cmd="" + else + cmd="ssh -t -t ${system}" + fi + cmd="${cmd} update-me" + urxvt -e ${cmd} & done -- cgit v1.2.3-54-g00ecf