Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
tkt-72067: Uppercase the RELEASE specified during create (#826)
Browse files Browse the repository at this point in the history
* Uppercase the RELEASE specified during create

This helps avoid lazy sysadmin syndrome

Reported by: Michael W Lucas

FreeNAS Ticket: #72067

* Move this to lib

* Check for None
  • Loading branch information
Brandon Schneider committed Jan 24, 2019
1 parent 1cc8be6 commit a331b51
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions iocage_lib/iocage.py
Expand Up @@ -550,9 +550,15 @@ def create(self,
_callback=self.callback,
silent=self.silent)

if release is not None:
if os.path.isdir(
f'{self.iocroot}/releases/{release.upper()}'
) and not template and not empty and not clone:
release = release.upper()

if not os.path.isdir(
f"{self.iocroot}/releases/{release}") and not template and \
not empty and not clone:
f'{self.iocroot}/releases/{release}'
) and not template and not empty and not clone:
freebsd_version = ioc_common.checkoutput(["freebsd-version"])

if "HBSD" in freebsd_version:
Expand Down

0 comments on commit a331b51

Please sign in to comment.