cd /etc/s6-rc s6-rc-compile .compiled-$SUFFIX source s6-rc-update $PWD/.compiled-$SUFFIX $* # TODO: avoid $* ln -s .compiled-$SUFFIX .compiled-${SUFFIX}.link mv .compiled-${SUFFIX}.link compiled # TODO: cleanup old .compiled-* dirs fsync compiled .
Is there a way to update /etc/s6-rc/compiled without risking a broken
system if the power fails midway through the update?
The best I can come up with is to use a symlink to a uniquely named
compiled directory and a recompile wrapper along those lines:
- Safely replacing /etc/s6-rc/compiled Jan Bramkamp
- Re: Safely replacing /etc/s6-rc/compiled Steve Litt
- Re: Safely replacing /etc/s6-rc/compiled Laurent Bercot