diff --git a/scripts/.common b/scripts/.common index a9801c6..f67ca8d 100644 --- a/scripts/.common +++ b/scripts/.common @@ -73,7 +73,7 @@ unlock_store() { pinfo "Direktil Local Server store already unlocked" else pinfo "Unlocking the DLS store ..." - DLS_ADM_TOKEN=$(dls /public/unlock-store -d "\"${DLS_UNLOCK_TOKEN}\""|tr -d \") + DLS_ADM_TOKEN=$(dls /public/unlock-store -d '{"Name": "novit", "Passphrase": "'$(echo -n ${DLS_UNLOCK_TOKEN}|base64 -w0)'"}'|tr -d \") pinfo "Admin access token is $DLS_ADM_TOKEN" echo $DLS_ADM_TOKEN > $tknfile chmod 444 $tknfile @@ -94,7 +94,7 @@ get_hosts() { get_parts() { for host in ${!hosts[*]}; do mkdir -p $ctxdir/data/$host - for part in kernel initrd-v2 + for part in kernel initrd do partfile=$ctxdir/data/$host/$part test -f $partfile || { pinfo "Downloading $part for host $host" && dls /hosts/$host/$part -o $partfile; } diff --git a/scripts/0.start_dls.sh b/scripts/0.start_dls.sh index e1cbe88..d019d6c 100755 --- a/scripts/0.start_dls.sh +++ b/scripts/0.start_dls.sh @@ -27,7 +27,6 @@ start_store() { -e HTTPS_PROXY=$HTTPS_PROXY \ -v .:/var/lib/direktil \ $DLS_IMG & -# -auto-unlock 'N0v!T' sleep 2 } diff --git a/scripts/1.qemu.sh b/scripts/1.qemu.sh index a15dc44..1ad0cea 100755 --- a/scripts/1.qemu.sh +++ b/scripts/1.qemu.sh @@ -33,7 +33,7 @@ setup_network_qemu() { if ! test -d /etc/qemu; then mkdir -p /etc/qemu fi - if ! grep -q "allow $QEMU_BR_NAME" /etc/qemu/bridge.conf; then + if ! grep -qs "allow $QEMU_BR_NAME" /etc/qemu/bridge.conf; then echo "allow $QEMU_BR_NAME" >> /etc/qemu/bridge.conf fi } @@ -46,7 +46,7 @@ run_qemu() { pinfo "Starting host $host with ip ${hosts[$host]}" qemu-system-x86_64 -enable-kvm -smp $QEMU_VM_CPU -m $QEMU_VM_MEM \ -nic bridge,br=$QEMU_BR_NAME,mac=42:42:42:42:42:0${id} \ - -kernel $ctxdir/data/$host/kernel -initrd $ctxdir/data/$host/initrd-v2 -vga qxl \ + -kernel $ctxdir/data/$host/kernel -initrd $ctxdir/data/$host/initrd -vga qxl \ -drive format=raw,file=$ctxdir/data/$host/disk & echo $! >$ctxdir/data/$host/pid ((++id)) diff --git a/scripts/vars b/scripts/vars index 3d292d4..ce752d2 100644 --- a/scripts/vars +++ b/scripts/vars @@ -1,14 +1,14 @@ ## Vars -# Admin token to unlock the DLS store +# Admin token to unlock the DLS store, replace it! DLS_UNLOCK_TOKEN=changeme # Docker container name for dir2config -D2C_IMG=novit.tech/direktil/local-server:b6fa941 +D2C_IMG=novit.tech/direktil/local-server:latest D2C_CTR_NAME=dir2config # Docker container name for direktil local server -DLS_IMG=novit.tech/direktil/local-server:b6fa941 +DLS_IMG=novit.tech/direktil/local-server:latest DLS_CTR_NAME=dls # QEMU local bridge name. If you specificy a custom name, you may have to configure qemu bridge helper to allow it @@ -18,7 +18,7 @@ QEMU_DISK_SIZE=30G # Allocated CPUs to QEMU VMs QEMU_VM_CPU=4 # Allocated Memory to QEMU VMs -QEMU_VM_MEM=8096 +QEMU_VM_MEM=4096 ################ # Token file for dls