-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add better detection of existing /etc/rc.local changes #258
Comments
How about "if /etc/rc.local.bak already exists, don't overwrite it". Overwrite rc.local all you want, but keep the original backup to be eventually restored. that's what I did to keep a multistage build (where I use a shrunken image as the input to the next phase, then shrink again) from ending up with an rc.local-loop. It works in my case because I know pishrink is the only thing messing with /etc/rc.local. When would you have a case where you edit the expansion script and need to retain those changes? Why not just put them in the backup, which gets run at the end of the expansion? |
Currently PiShrink uses
md5sum
to detect if we have already changed/etc/rc.local
. This is extremely fragile and not the best choice.The new method should:
/etc/rc.local
should not be touchedMy initial idea for a new method is to put a unique string into the expansion script which we key on.
The text was updated successfully, but these errors were encountered: