opnsense / update

OPNsense update tools
https://opnsense.org/
BSD 2-Clause "Simplified" License
124 stars 74 forks source link

Update opnsense-bootstrap.sh #71

Closed unquietwiki closed 3 years ago

unquietwiki commented 3 years ago

I was trying to use this with GCP's FreeBSD 12.2 image. One thing it still likes to do is strip out google-cloud-sdk, and nano if that's previously installed. In the meanwhile, I used shellcheck to audit it for potential issues & applied recommended fixes.

One other thing to look at with this: in virtualized environments like GCP, Azure, etc; the IP address for all interfaces, are already assigned, so everything needs to be DHCP. I feel like this script could help fix that ahead of time, but not sure how.

Thanks for making a good product though. Been using it for stuff for years now.

fichtner commented 3 years ago

Bootstrap will always flush all packages in case there will be conflicts during install that would otherwise be fatal.

Most updates are just style/sanity and I don't mind except for comments where this does have operational effects not indented.

unquietwiki commented 3 years ago

My biggest reason for looking at this was having tried this for the second time, and then the VM was throwing a bunch of random Python errors at me intermittently. I was able to determine that was the Google Cloud stuff being removed by the main opnsense package (I commented out the reboot command to observe this). One of the things I was told to fix said "leaving this as is may end up deleting whole directories", or something like that.

fichtner commented 3 years ago

Oh and for DHCP yes it's manual for now where you could prepare a /conf/config.xml prior to bootstrap that will be picked up instead of a factory reset. We were also discussing cloud-init (available as a package too), but not sure how this can be easily leveraged.

unquietwiki commented 3 years ago

@fichtner Good to know! BTW, if you're curious at all, or for your team's testing, https://console.cloud.google.com/marketplace/product/freebsd-cloud/freebsd-12 is was I tried this script with.

fichtner commented 3 years ago

Let me cherry-pick the useful safety bits manually then and you get some rest. Thanks for the talk :)

unquietwiki commented 3 years ago

Thanks @fichtner! Keep safe & well & I'll check back on what you come up with!