Stat_chmod jails dir during non-interactive create
This commit is contained in:
parent
823e74a78b
commit
eee3abef8e
8
jlmkr.py
8
jlmkr.py
|
@ -951,10 +951,6 @@ def interactive_config():
|
|||
recommended_distro = config.my_get("distro")
|
||||
recommended_release = config.my_get("release")
|
||||
|
||||
# Create the dir where to store the jails
|
||||
os.makedirs(JAILS_DIR_PATH, exist_ok=True)
|
||||
stat_chmod(JAILS_DIR_PATH, 0o700)
|
||||
|
||||
#################
|
||||
# Config handling
|
||||
#################
|
||||
|
@ -1249,6 +1245,10 @@ def create_jail(**kwargs):
|
|||
# Cleanup in except, but only once the jail_path is final
|
||||
# Otherwise we may cleanup the wrong directory
|
||||
try:
|
||||
# Create the dir where to store the jails
|
||||
os.makedirs(JAILS_DIR_PATH, exist_ok=True)
|
||||
stat_chmod(JAILS_DIR_PATH, 0o700)
|
||||
|
||||
jail_config_path = get_jail_config_path(jail_name)
|
||||
jail_rootfs_path = get_jail_rootfs_path(jail_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue