Coder Social home page Coder Social logo

Comments (7)

grahamgilbert avatar grahamgilbert commented on June 19, 2024

As far as I’m concerned this works as intended. It was a deliberate move on my part to require scripts to exit 0 to indicate success. Which “new behaviour” would people be relying on? Imagr has behaved this way for as long as I can remember.

from imagr.

jgreen210 avatar jgreen210 commented on June 19, 2024

It's "new" for me :-) - I only just rebuilt my netrestore.nbi since the old one worked for El Capitan and Sierra. The commit I mentioned is dated 16 Aug 2016. Whatever version of imagr that I was using before didn't go into an infinite loop.

from imagr.

jgreen210 avatar jgreen210 commented on June 19, 2024

Checking the exit code is a good thing to do.

People that have used imagr first boot scripts since this change being made will generally be relying on the retries to cover up sporadic failures, so removing the retries now isn't the right answer. A retry limit, cancel button and presumably dialogue if the retry limit is exceeded would be a nicer way to handle a permanently non-zero exit code.

from imagr.

jgreen210 avatar jgreen210 commented on June 19, 2024

A dialogue on exceeding the retry limit would require local intervention on failure, so its use should be configurable and/or could have a configurable timeout.

from imagr.

jgreen210 avatar jgreen210 commented on June 19, 2024

What happens if there are multiple first-boot scripts? I only have one, so I don't know.

What should happen if there are multiple first-boot scripts? Should too many non-zero exit codes prevent later first-boot scripts from running? I like things to fail fast, so I'd want that. It's more conservative, so I think that should probably be the default. Others might want things to work as best as possible despite failures, but would still want to know if any steps failed.

from imagr.

jgreen210 avatar jgreen210 commented on June 19, 2024

My first-boot script (with its non-zero exit code) is getting rerun in a loop even after I restart the mac, preventing a local login. So, to debug a non-zero exit code I need to either:

  • scroll back to the first failure (which is generally different to the subsequent ones since my first-boot script isn't idempotent) and take a photo of the screen before the script re-runs.
  • reset machine (hold down power button) then boot into recovery and find first-boot.log under /Volumes/
  • disable the first-boot script and run it manually (which would require a local login, so isn't doing precisely the same thing).
  • wrap the first boot script to hide the exit code.
  • change imagr.

from imagr.

grahamgilbert avatar grahamgilbert commented on June 19, 2024

If you wish to do a PR to do this I would look at it, but I will not be working on this as I consider this a feature, not a bug. I personally think your scripts should be able to recover from a failure.

from imagr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.