webos-homebrew-channel icon indicating copy to clipboard operation
webos-homebrew-channel copied to clipboard

Startup script updates

Open Informatic opened this issue 4 years ago • 2 comments

Currently start-devmode.sh script is mostly used for early bootup. We want this to not be a symlink but a copy, in case homebrew channel gets accidentally removed. Currently this is (will be) manually deployed during exploit / first homebrew channel install, but there's no way of updating it.

This should be acomplished by comparing a sha256sum of app-bundled startup.sh to a checksum of start-devmode.sh script, and a popup should be shown on Homebrew Channel startup in case these don't match.

  • [ ] Script sha256sum verification on Homebrew Channel startup
  • [ ] UI popup with update confirmation
  • [ ] Testing

Informatic avatar Apr 19 '21 17:04 Informatic

sha256 seems like slight overkill, why not just diff? (i.e. read both files into a buffer and do string comparison)

DavidBuchanan314 avatar Apr 19 '21 23:04 DavidBuchanan314

Misphrased that, I meant "Homebrew Channel app startup".

Considering how small the script is, it shouldn't make any significant performance impact, and we happen to already have a single place to get a file sha256 checksum in the service done purely in nodejs, instead of calling any external tools.

Informatic avatar Apr 20 '21 06:04 Informatic