From f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1 Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Date: Mon, 5 Dec 2016 11:00:56 -0600 Subject: systemd-boot.bbclass: Fix SYSYTEMD_BOOT_CFG creation This patch makes sure the directory which will contain the systemd configuration (loader.conf) is created before the configuration file is written, fixing errors when it tried to write it to a non-existent directory Signed-off-by: Alejandro Hernandez Signed-off-by: Ross Burton --- meta/classes/systemd-boot.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta/classes/systemd-boot.bbclass') diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass index 6718783367..6a2cbc8a93 100644 --- a/meta/classes/systemd-boot.bbclass +++ b/meta/classes/systemd-boot.bbclass @@ -72,6 +72,9 @@ python build_efi_cfg() { return cfile = d.getVar('SYSTEMD_BOOT_CFG') + cdir = os.path.dirname(cfile) + if not os.path.exists(cdir): + os.makedirs(cdir) try: cfgfile = open(cfile, 'w') except OSError: -- cgit 1.2.3-korg