Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions build/dappnode/scripts/dappnode_install_pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,20 @@ install_docker_compose()
fi
}

install_wireguard()
{
##############################################
##############################################
#### WIREGUARD INSTALLATION ####
##############################################
##############################################

echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update | tee -a $LOG_FILE
apt -y install wireguard | tee -a $LOG_FILE
}

##############################################
##############################################
#### SCRIPT START ####
Expand Down Expand Up @@ -141,3 +155,10 @@ if docker-compose -v >/dev/null 2>&1 ; then
else
install_docker_compose 2>&1 | tee -a $LOG_FILE
fi

# Only install wireguard if needed
if modprobe wireguard >/dev/null 2>&1 ; then
echo -e "\e[32m \n\n wireguard is already installed \n\n \e[0m" 2>&1 | tee -a $LOG_FILE
else
install_wireguard 2>&1 | tee -a $LOG_FILE
fi
12 changes: 6 additions & 6 deletions build/scripts/generate_dappnode_iso_debian.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

echo "Downloading debian ISO image: firmware-10.2.0-amd64-netinst.iso..."
if [ ! -f /images/firmware-10.2.0-amd64-netinst.iso ]; then
wget https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/10.2.0+nonfree/amd64/iso-cd/firmware-10.2.0-amd64-netinst.iso \
-O /images/firmware-10.2.0-amd64-netinst.iso
echo "Downloading debian ISO image: firmware-10.3.0-amd64-netinst.iso..."
if [ ! -f /images/firmware-10.3.0-amd64-netinst.iso ]; then
wget https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/10.3.0+nonfree/amd64/iso-cd/firmware-10.3.0-amd64-netinst.iso\
-O /images/firmware-10.3.0-amd64-netinst.iso
fi
echo "Done!"

Expand All @@ -12,11 +12,11 @@ rm -rf dappnode-iso
rm DappNode-debian-*

echo "Extracting the iso..."
xorriso -osirrox on -indev /images/firmware-10.2.0-amd64-netinst.iso \
xorriso -osirrox on -indev /images/firmware-10.3.0-amd64-netinst.iso \
-extract / dappnode-iso

echo "Obtaining the isohdpfx.bin for hybrid ISO..."
dd if=/images/firmware-10.2.0-amd64-netinst.iso bs=432 count=1 \
dd if=/images/firmware-10.3.0-amd64-netinst.iso bs=432 count=1 \
of=dappnode-iso/isolinux/isohdpfx.bin

cd dappnode-iso
Expand Down