X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai-redep;h=d7ba0043f9979f1292f620168417974c9f41d0e3;hb=c2147ec5fff62b6a260f17d5e6ba8dabde5264c7;hp=935e96c5af2b696ac375b70ab6ff00f4d8962250;hpb=54bb7f0a4160d995d7d7f8500495922f9f37d2b7;p=automated-distro-installer diff --git a/fai-redep b/fai-redep index 935e96c..d7ba004 100755 --- a/fai-redep +++ b/fai-redep @@ -22,14 +22,13 @@ EOF scp ~/.ssh/id_rsa.pub \ root@faiserver:/srv/fai/config/files/home/ian/.ssh/authorized_keys/GRUB_PC s scp -r /q/root/luks root@faiserver:/srv/fai/config/distro-install-common -ssh root@faiserver chmod -R a+r /srv/fai/config/distro-install-common +ssh root@faiserver chmod -R a+rX /srv/fai/config/distro-install-common s virshrm demohost ||: -# this one doesn't need to be done every time -s qemu-img create -o preallocation=metadata -f qcow2 \ - /var/lib/libvirt/images/demohost 30G -s qemu-img create -o preallocation=metadata -f qcow2 \ - /var/lib/libvirt/images/demohostb 30G + +for f in /var/lib/libvirt/images/demohost{,b}; do + [[ -e $f ]] || s qemu-img create -o preallocation=metadata -f qcow2 $f 30G +done # osinfo-query os | gr jessie s virt-install --os-variant debian8 --cpu host -n demohost --pxe -r 2048 --vcpus 1 \ --disk path=/var/lib/libvirt/images/demohost \