summaryrefslogtreecommitdiff
path: root/manage-baserock
Commit message (Collapse)AuthorAgeFilesLines
* Refuse to delete chroots which are in useSam Thursfield2015-05-191-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that `manage-baserock rm` can delete data from filesystems that are mounted in a chroot directory. This is most likely to happen if the chroot is active (and schroot created the mounts), so let's check that there are no active sessions before deleting. You now get a message like this if you try to remove a chroot with active sessions: I found the following active sessions for chroot '15.19': session:baserock-15.19-4ef616d2-fdbf-4796-bcee-7132b989a2f8 session:baserock-15.19-e0f00498-190a-44be-9d29-cce057cbb259 You might lose data in mounted filesystems if I were to recursively delete path /opt/baserock/chroots/15.19. If you think these sessions are stale, you can run the following command to end ALL schroot sessions: schroot --end-session --all-sessions I found that on my laptop there were a lot of stale sessions, probably from when my computer had crashed while an 'schroot' session was open so the session didn't get automatically ended. Stale sessions now will prevent the user from being able to use `manage-baserock rm` so we need to tell them about them. Change-Id: I90aa19717d8e7007fb6aced9a8e9422967ddc64f
* Quote shell variable expanions in previous patch seriesSam Thursfield2014-06-171-4/+4
|
* Give helpful error when URL doesn't existSam Thursfield2014-06-161-0/+4
| | | | | | | | | | It's slightly confusing that this script doesn't parse file:// URLs, but this is an improvement. Previously the error given was: ln: failed to create symbolic link ‘/opt/baserock/chroots/tmp.P46u6ZxYQC/tarball’ -> ‘’: No such file or directory Sorry, could not link foo into place
* Fix strange error when /opt/baserock/chroots directory is missingSam Thursfield2014-06-161-0/+2
| | | | | | | Create the directory if missing to avoid this when doing `manage-baserock add` mktemp: failed to create directory via template ‘/opt/baserock/chroots/tmp.XXXXXXXXXX’: No such file or directory
* Give helpful error when `manage-baserock add` is not given a URLSam Thursfield2014-06-161-1/+6
|
* Raise an error when system name is invalidSam Thursfield2014-06-161-2/+15
| | | | | | This is better than proceeding to add a system with a different name to the one the user specified, without telling them that the name was mangled.
* Allow '.' in chroot namesSam Thursfield2014-06-121-1/+1
| | | | Baserock version numbers contain '.', so it's common to want to use it.
* Enable shared /srcDaniel Silverstone2014-03-311-0/+4
| | | | | | | | | | This adds a shared /src mounted from /opt/baserock/src This allows chroots to share /src and also provides a persistent src space in the face of adding and removing chroots. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk> Reviewed-by: Sam Thursfield <sam.thursfield@codethink.co.uk>
* Add GPLv2 headers to top of scriptsDaniel Silverstone2014-03-051-0/+18
|
* Add tool to simplify managing baserock chrootsDaniel Silverstone2014-03-051-0/+118