summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDohyung Kim <dohyung2.kim@samsung.com>2017-11-21 16:36:14 +0900
committerINSUN PYO <insun.pyo@samsung.com>2020-07-22 19:23:52 +0900
commit0eb9644b15402dc1c0fe8abd1c497813e1ee9512 (patch)
tree64c91bd637b5ca48f24f9c7a7de5933520e06ff5
parent36c2b5b3b0abe27272a881186e16c9dbd2ebc7fd (diff)
downloadkickstarter-accepted/tizen_7.0_unified.tar.gz
kickstarter-accepted/tizen_7.0_unified.tar.bz2
kickstarter-accepted/tizen_7.0_unified.zip
Change-Id: If5c94ef67305bd04c6919e65ea7e3bd6a8e4e594 Signed-off-by: Dohyung Kim <dohyung2.kim@samsung.com>
-rw-r--r--kickstart/kickstart.tmpl9
-rw-r--r--kswriter/KSWriter.py13
2 files changed, 21 insertions, 1 deletions
diff --git a/kickstart/kickstart.tmpl b/kickstart/kickstart.tmpl
index 10059a8..3ada3d6 100644
--- a/kickstart/kickstart.tmpl
+++ b/kickstart/kickstart.tmpl
@@ -139,7 +139,16 @@ ${metadata.Post}
${metadata.NoChroot}
%end
+#if $metadata.Run != ""
%runscript
${metadata.Run}
%end
+#end if
+
+#if $metadata.Umount != ""
+%post-umount
+${metadata.Umount}
+%end
+#end if
+
diff --git a/kswriter/KSWriter.py b/kswriter/KSWriter.py
index 9449eb4..fdc27e8 100644
--- a/kswriter/KSWriter.py
+++ b/kswriter/KSWriter.py
@@ -92,7 +92,7 @@ class KSWriter():
plat = copy.copy(self.image_meta[img['Platform']])
conf.update(plat)
conf.update(img)
- lval = ['Repos', 'Groups', 'PostScripts', 'NoChrootScripts', 'RemovePackages', 'ExtraPackages', 'RunScripts', 'EnvScripts']
+ lval = ['Repos', 'Groups', 'PostScripts', 'NoChrootScripts', 'RemovePackages', 'ExtraPackages', 'RunScripts', 'EnvScripts', 'UmountScripts']
lvald = {}
for l in lval:
full = []
@@ -145,6 +145,16 @@ class KSWriter():
else:
raise KSMetaError('%s/scripts/%s.env not found, aborting.' %(meta_root, scr ))
+ umountscript = ""
+ for scr in conf['UmountScripts']:
+ if os.path.exists('%s/scripts/%s.umount' %(meta_root,scr)):
+ f = open('%s/scripts/%s.umount' %(meta_root, scr ), 'r')
+ umountscript += f.read()
+ umountscript += "\n"
+ f.close()
+ else:
+ raise KSMetaError('%s/scripts/%s.umount not found, aborting.' %(meta_root, scr ))
+
ptab = ""
for g in [ plat, img ]:
if g.has_key("Part"):
@@ -166,6 +176,7 @@ class KSWriter():
conf['Post'] = postscript
conf['NoChroot'] = nochrootscript
conf['Run'] = runscript
+ conf['Umount'] = umountscript
if envscript:
conf['Env'] = envscript
return conf