05/08/2010

jail nom_jail not found

Lors de l'utilisation de la commande jexec je voulais être capable d'utiliser le nom de ma jail au lieu de faire un jls et passer par son JID.

En lisant le man je vois que cela est possible :

jail [-hi] [-n jailname]

Je teste donc l'option :

# jexec -n nom_jail ps
jexec: jail nom_jail not found

Je vérifie à l'aide de la commande jls pour voir si je me trompe pas dans le nom de la jail. Non.

Bon bah, il reste plus qu'à RTFM ( man jail ) et là on peut voir :

The jail utility creates a new jail or modifies an existing jail, option-ally imprisoning the current process (and future descendants) inside it. The options are as follows: -n jailname Set the jail's name. This is deprecated and is equivalent to setting the name parameter.

Je rajoute donc dans mon rc.conf :

jail_nomjail_flags="-n nomjail"

Je relance la jail... and it works !