trynd / wren

Linux boot platform that provides a portable, multi-system, run-in-memory Linux environment.
GNU General Public License v3.0
0 stars 1 forks source link

Wren control script (wrenctl) #11

Closed codewithmichael closed 9 years ago

codewithmichael commented 9 years ago

As briefly suggested in issue #8, having a central Wren control script would abstract and centralize underlying script access, providing leverage to make larger/sweeping backend script changes without affecting the public API — e.g.:

save.sh -s testuser

could (simply) become

wrenctl save -s testuser

or, with a bit of additional functionality

wrenctl set savename testuser
wrenctl save

This would allow us to, at any point, rename/move save.sh, or remove and replace it entirely without affecting the public API.

The name, wrenctl, is taken from common nomenclature as used, for example, by apachectl. Any name would suffice, even simply wren itself.

codewithmichael commented 9 years ago

I've got this mostly working. I opted for the simple name wren, as it makes for more sensible command lines, and I plan on symlinking it at /usr/local/sbin/wrenduring the wrender build process to make it location agnostic. That way we can implement #8 (Move to /opt/wren) in a follow up release.

So far the new script supports saving, expanding active data storage, and viewing/updating the Grub config. This includes the ability to set a "savename" or "savefile" value. I think I'll take it a bit further and add an option to list existing savenames, as Wren GUI does. It would be more convenient than having to list the device saves directory contents.

Anyway, I should have a pull request in later today or tomorrow.

codewithmichael commented 9 years ago

I've addressed this issue with pull request #16 (Wren control script). In the end I opted to symlink the new script, wren, at /usr/sbin/wren, as many scripts clean their path using PATH=/usr/sbin:/usr/bin:/sbin:/bin and I wanted the script to remain available in those cases since it is a primary, OS-level control script.

codewithmichael commented 9 years ago

Released in v0.1.2.