X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai-redep;h=e7aab6d221f564f1664c20dbcc35a3bb156f59aa;hb=6315fdaa029f0f107d98fde18ab584f958e06108;hp=ac73c7b16e539a67cbddcbdc5f634cbab05c7770;hpb=948ef49d2b4d7680da2355acf9da86f81ca75ecd;p=automated-distro-installer diff --git a/fai-redep b/fai-redep index ac73c7b..e7aab6d 100755 --- a/fai-redep +++ b/fai-redep @@ -11,6 +11,10 @@ usage() { usage: ${0##*/} [OPTIONS] [HOST] Deploy fai config (the one in nfs) to HOST or default faiserver +Note, for booting from fai-cd, this needs to be called from myfai-chboot or that via pxe-server, +due to setting +echo FAI_ACTION=$fai_action >> /srv/fai/config/class/LAST.var +note FAI_ACTION might be able to be set elsewhere, like in grub for this case -d DISTRO DISTRO for setting up fai class DESKTOP packages, for preinstalling stuff. -t TARGET_HOST Copy only secrets for TARGET_HOST into the config space. Useful for virtual server @@ -59,7 +63,7 @@ sudo rsync -a /root/.ssh/home.pub \ # these files are not available. if [[ $target ]]; then - if [[ -e /q/root/shadow/$target ]]; then + if sudo test -e /q/root/shadow/$target; then shadowfile=shadow/$target # empty otherwise fi sudo rsync -lpt --files-from=- /q/root root@$faiserver_host:/srv/fai/config/distro-install-common </dev/null ||: # broken pipe -rsync -rplt --delete $BASEFILE_DIR/*.gz root@$faiserver_host:/srv/fai/config/basefiles/ +rsync -rplt --include '/*.gz' --exclude '/**' --delete-excluded $BASEFILE_DIR/ root@$faiserver_host:/srv/fai/config/basefiles/ ssh root@$faiserver_host bash <<'EOF' set -eE -o pipefail # make it the root because pxe-kexec only looks there.