Closed DiddyWolf closed 4 years ago
Thanks for reporting this- I'm actually somewhat surprised that any files are write protected. I'll have to see if I can replicate.
The cleanshutdown
and other "get.pimoroni.com" installers live in a private repository at the moment, which is why you wouldn't have found it. (I'm not sure there's a good reason for it even being private anymore)
I'd submit a pull request for this, but I couldn't actually find a repo with the 'cleanshutdown' script in it.
On line 1098 of the cleanshutdown script, after running setup.sh cloned from this git repo, the script tries to remove the git clone directory.
cd $installdir && rm -r $installdir/$gitclonedir &> /dev/null
This hangs the script due to some of the git files being write protected.
pi@raspberrypi:~/Pimoroni $ rm -r clean-shutdown/ rm: remove write-protected regular file 'clean-shutdown/.git/objects/b5/e36d217cd58b69c8cb5bbd2219541ecc262c2f'?
You may want to add a -f to the rm command to avoid this.