Add --start flag for create command
This commit is contained in:
parent
2b104682b5
commit
ac75cd3c28
6
jlmkr.py
6
jlmkr.py
|
@ -1192,6 +1192,7 @@ def create_jail(**kwargs):
|
||||||
if not check_jail_name_available(jail_name):
|
if not check_jail_name_available(jail_name):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
start_now = kwargs.pop("start", start_now)
|
||||||
jail_config_path = kwargs.pop("config")
|
jail_config_path = kwargs.pop("config")
|
||||||
|
|
||||||
config = KeyValueParser()
|
config = KeyValueParser()
|
||||||
|
@ -1928,6 +1929,11 @@ def main():
|
||||||
)
|
)
|
||||||
commands["create"].add_argument("--distro")
|
commands["create"].add_argument("--distro")
|
||||||
commands["create"].add_argument("--release")
|
commands["create"].add_argument("--release")
|
||||||
|
commands["create"].add_argument(
|
||||||
|
"--start", #
|
||||||
|
help="start jail after create",
|
||||||
|
action="store_true",
|
||||||
|
)
|
||||||
commands["create"].add_argument(
|
commands["create"].add_argument(
|
||||||
"--startup",
|
"--startup",
|
||||||
type=int,
|
type=int,
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --config /mnt/tank/path/to/docker/config mydockerjail`.
|
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --start --config /mnt/tank/path/to/docker/config mydockerjail`.
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --config /mnt/tank/path/to/incus/config myincusjail`.
|
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --start --config /mnt/tank/path/to/incus/config myincusjail`.
|
||||||
|
|
||||||
Unfortunately incus doesn't want to install from the `initial_setup` script inside the config file. So we manually finish the setup by running the following after creating and starting the jail:
|
Unfortunately incus doesn't want to install from the `initial_setup` script inside the config file. So we manually finish the setup by running the following after creating and starting the jail:
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --config /mnt/tank/path/to/lxd/config mylxdjail`.
|
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --start --config /mnt/tank/path/to/lxd/config mylxdjail`.
|
||||||
|
|
||||||
Unfortunately snapd doesn't want to install from the `initial_setup` script inside the config file. So we manually finish the setup by running the following after creating and starting the jail:
|
Unfortunately snapd doesn't want to install from the `initial_setup` script inside the config file. So we manually finish the setup by running the following after creating and starting the jail:
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --config /mnt/tank/path/to/podman/config mypodmanjail`.
|
Check out the [config](./config) template file. You may provide it when asked during `jlmkr create` or, if you have the template file stored on your NAS, you may provide it directly by running `jlmkr create --start --config /mnt/tank/path/to/podman/config mypodmanjail`.
|
||||||
|
|
||||||
## Rootless
|
## Rootless
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue