X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=sidebyside;f=fai-redep;h=cd0888737541a0d475d7de19df177b193ee3fbf2;hb=a8ec695d6a39792133a21e9eca70e69f9fab107b;hp=4ca3ea52b628df6fed6b6f86ae3151bc1fbd4995;hpb=4261ad7e021ec77e7198cf42c3576dad07f12a64;p=automated-distro-installer diff --git a/fai-redep b/fai-redep index 4ca3ea5..cd08887 100755 --- a/fai-redep +++ b/fai-redep @@ -5,7 +5,7 @@ set -x # then start a virtual machine to test the config. set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR +trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR cd $(dirname $(readlink -f "$BASH_SOURCE")) @@ -20,10 +20,10 @@ scp -r fai/config root@faiserver:/srv/fai # On arch, best seems to be copy your shadow file to a temp location, # then passwd, get out the new pass, then copy the shadow file back. -if [[ -e /q/root/shadow/standard ]]; then - # note, it would be best to have some kind of security on this file +f=/q/root/shadow/standard +if s test -e $f; then ssh root@faiserver tee -a /srv/fai/config/class/DEFAULT.var <