DragonFly submit List (threaded) for 2008-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: add start/stop/restart single jail to /etc/rc.d/jail
Hi Kevin,
* Kevin L. Kane wrote:
> I was getting very annoyed at the fact that when I do /etc/rc.d/jail
> restart it restarts all jails and there didnt seem to be an easy way
> to do that for only one jail on a machine.
>
> The attached patch allows you to do
> /etc/rc.d/jail (stop/start/restart) (jailname)
Your patch is against rev 1.4. The newest one is 1.5, so the patch
won't apply cleanly. Could you please resubmit a diff against latest
HEAD.
> Something that might need more thinking(this works well enough for me)
> but on stop it searchs the jail list for a jail referenced by
> jailname. It then finds the JID based on hostname and issues jexec
> JID kill -TERM -1. If your jls gets filled up with multiple entries
> for the same hostname it gets kinda broken, also if you have jails
> that do in fact have the same hostname you also get confusion. Maybe
> it should match all fields instead of just hostname?
To be on the safe side, this would be nice. A bit of awk/shell magic
should do the trick. A jls output with the same jail happens quite
often (for me at least :):
JID Hostname Path IPs
10 jail1 /usr/jail/j1 10.253.195.110
8 jail1 /usr/jail/j1 10.253.195.110
Regards,
Matthias
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]