(Finally figured out gmail's email alias can be set as default, so my
addy just changed.)

Hi, I have my first program to publish, and would like a little feedback.

zchroot is a bash script to work with encrypted chroot-in-a-file chroots.
--help output is at end of this email.

Right now zchroot is robust for: creating new, showing status of,
mounting and unmounting, encrypted, loopback mounted, chroot in a file
files. Soon I shall double check the robustness of running a command
outside of, or chrooted into, a chroot.

First version I wrote was may be 3 years ago, and at that time I did
not know of schroot.
First version was clumsy, spread over two files, etc.

I started reading schroot docs, man page and config files/ dirs, but
after an hour or two did not to my satisfaction wrap my head around
doing what I really wanted, so bit the bullet and reworked zchroot
into something more palatable than it was.

Last few days (may be I should have read more on schroot :/) I updated
it to this version, which if it's useful to others, I would like to
release.

It may be that schroot can do it all, perhaps with just a little
custom up/down scripts. So if someone is familiar with schroot, I'd
like some feedback on this if you have time.

Quick questions:

*) Should I post zchroot here, plain or zipped?
It is 551 lines, zenlib.sh is 157, and zchroot.conf is 66 lines.

TIA
Zenaan

----
Create and do things related to loopback mounted file based chroot
guests, on this host.

Usage: zchroot --new <chroot>                : Create chroot; NOTE:
chroot ~= suite-target.
       zchroot <action> <CMD> [<chroot>...]  : Run commands against chroots.
       zchroot <chroot>                      : Open shell in chroot.
       zchroot --help                        : Display more help.

Mandatory arguments to long options are mandatory for short options too.

<actions>
  -n,  --new <chroot>   Create new chroot guest in a loopback mounted file.
  -s,  --status <chroot>...
                        Show status of chroots.
  -h,  --host-init      Do some chroot-related host initialization,
                        eg. xhost/ X local connections.
  -m,  --mount <chroot>...
  -u,  --umount <chroot>...
                        Mount and umount chroot(s).
  -i,  --in <CMD> <chroot>...
                        For each chroot, run CMD after chrooting into chroot:
                        run CMD as chroot root user, from chroot(s)' / dir.
  -o,  --out <CMD> <chroot>...
                        For each chroot, run CMD:
                        run CMD as current user, from chroot(s)' / dir.
  -l,  --list-mounts    List mounted chroots ??
  -bm, --bmount <chroot>...
  -bu, --bumount <chroot>...
                        (U)mount bind mounts for chroots (eg /tmp, /dev).
  -t,  --tmp            Do some random tmp stuff.
       --help           Show this help.

<chroot> Filename or mountpoint dir, eg lucid-dbtest.img or lucid-dbtest
         When creating new chroot, name must be of form 'suite-target',
         with a hyphen separating the two components:
         'suite': distribution suite, eg lucid, testing, lenny.
         'target': a name distinguishing this chroot from others, eg dbtest
<CMD>    Command to run, include quotes eg "apt-get update"

Env config parameters will be loaded from ~/etc/zchroot.conf
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to