Comments (7)
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.
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.
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.
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.
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.
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.
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)
- imagr open behind select language pane in macOS Sierra HOT 3
- Imagr crashes if reporting server unavailable HOT 2
- Imagr crashes if timeapi.org returns unexpected data HOT 1
- Description text box for the workflows is not scrollable HOT 1
- Imagr logs a crash if a volume is unmounted HOT 2
- Setting time with http fails to respect timezone HOT 4
- Bug: first-boot items are not installed in order in macOS High Sierra
- validateplist doesn't append query string to background_image check
- Packages/DMGs with spaces will fail if using gurl HOT 2
- Feature request: Prevent Mac from sleeping while Imagr app is running a workflow HOT 1
- After APFS to HFS Conversion via script will casue Imagr to hang HOT 9
- Does not work with macOS 10.13.4 Installer HOT 4
- 10.11 NBI workflow start crash HOT 1
- Workflow doesn't recognize volume format change HOT 4
- Auto key of computer_name component ignored when part of included workflow HOT 2
- com.apple.osinstall error -3 on OS X 10.13.4 if workflow writes to formatted target before startosinstall HOT 2
- first_boot LaunchDaemon does not get created when startosinstall is called via included_workflow HOT 1
- Imagr (High Sierra) preventing reboot during install workflow HOT 1
- first-boot fails to start after Mojave install HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagr.