summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2016-12-05 11:00:56 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-16 18:01:57 +0000
commitf4ba23212c97fb8c3351a3cf981ee355ae2fc9b1 (patch)
tree85ac5c69d7808b80665844f65f4fbe50e49d538c /meta
parent016b19c2589582d7ec3c8cac9cfa75a1edc716fe (diff)
downloadopenembedded-core-f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1.tar.gz
openembedded-core-f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1.tar.bz2
openembedded-core-f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1.zip
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 <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/systemd-boot.bbclass3
1 files changed, 3 insertions, 0 deletions
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: