Skip to content

Commit

Permalink
env/openbsd-amd64: syspatch on first boot
Browse files Browse the repository at this point in the history
syspatch is currently being invoked at the end of the installation, which
means we're trying to patch the installation ramdisk kernel, rather than the
generic kernel. Instead, invoke syspatch during the first boot of the generic
kernel. Move pkg_add as well, since that is also generally safer to run outside
of the installation.

Update golang/go#35712
Update golang/go#42542

Change-Id: Icbb384816de5859078a0183919626d223fb0060f
Reviewed-on: https://go-review.googlesource.com/c/build/+/278732
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
4a6f656c authored and dmitshur committed Dec 17, 2020
1 parent 911ac7d commit 1355586
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions env/openbsd-amd64/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,20 @@ fi
mkdir -p etc
cat >install.site <<EOF
#!/bin/sh
syspatch
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git
touch /firstboot
echo 'set tty com0' > boot.conf
EOF

cat >etc/installurl <<EOF
https://${MIRROR}/pub/OpenBSD
EOF
cat >etc/rc.local <<EOF
if [[ -f /firstboot ]]; then
syspatch
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git
rm -f /firstboot
fi
(
set -x
Expand Down

0 comments on commit 1355586

Please sign in to comment.