Skip to content

Instantly share code, notes, and snippets.

@northox
Created October 10, 2018 12:21
Show Gist options
  • Save northox/c79f63663b9b28f8c968a9ca5bfbf93c to your computer and use it in GitHub Desktop.
Save northox/c79f63663b9b28f8c968a9ca5bfbf93c to your computer and use it in GitHub Desktop.
OpenBSD upgrade
#!/bin/sh
v=63
dotv=6.3
url=ftp://openbsd.cs.toronto.edu/pub/OpenBSD/
files='{man*tgz,comp*tgz,base*tgz,bsd*,INS*,SHA256.sig}'
vfiles='{man*tgz,comp*tgz,base*tgz,bsd*,INS*}'
mkdir $v
cd $v
ftp -Via $url/${dotv}/`uname -m`/${files}
signify -C -p /etc/signify/openbsd-${v}-base.pub -x SHA256.sig $vfiles
if [ $? -eq 0 ]; then
doas mv bsd.rd /
echo new bsd.rd installed
else
echo signify failed - leaving it dirty
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment