diff options
author | Dohyung Kim <dohyung2.kim@samsung.com> | 2017-11-21 16:36:14 +0900 |
---|---|---|
committer | INSUN PYO <insun.pyo@samsung.com> | 2020-07-22 19:23:52 +0900 |
commit | 0eb9644b15402dc1c0fe8abd1c497813e1ee9512 (patch) | |
tree | 64c91bd637b5ca48f24f9c7a7de5933520e06ff5 | |
parent | 36c2b5b3b0abe27272a881186e16c9dbd2ebc7fd (diff) | |
download | kickstarter-accepted/tizen_7.0_unified.tar.gz kickstarter-accepted/tizen_7.0_unified.tar.bz2 kickstarter-accepted/tizen_7.0_unified.zip |
Add 'UmountScripts' templete which support '%post-umount' sectionHEADtizen_9.0_m2_releasetizen_8.0_m2_releasetizen_7.0_m2_releasetizen_6.5.m2_releasetizen_6.0.m2_releasesubmit/tizen_6.5/20211028.163401submit/tizen_6.0_hotfix/20201103.115102submit/tizen_6.0_hotfix/20201102.192902submit/tizen_6.0/20201029.205502submit/tizen/20200724.131026accepted/tizen/unified/20200727.075556accepted/tizen/9.0/unified/20241030.235953accepted/tizen/8.0/unified/20231005.095009accepted/tizen/7.0/unified/hotfix/20221116.110922accepted/tizen/7.0/unified/20221110.063434accepted/tizen/6.5/unified/20211029.013845accepted/tizen/6.0/unified/hotfix/20201103.051725accepted/tizen/6.0/unified/hotfix/20201102.233723accepted/tizen/6.0/unified/20201030.110920tizen_9.0tizen_8.0tizen_7.0_hotfixtizen_7.0tizen_6.5tizen_6.0_hotfixtizen_6.0tizenaccepted/tizen_unifiedaccepted/tizen_9.0_unifiedaccepted/tizen_8.0_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unifiedaccepted/tizen_6.5_unifiedaccepted/tizen_6.0_unified_hotfixaccepted/tizen_6.0_unified
Change-Id: If5c94ef67305bd04c6919e65ea7e3bd6a8e4e594
Signed-off-by: Dohyung Kim <dohyung2.kim@samsung.com>
-rw-r--r-- | kickstart/kickstart.tmpl | 9 | ||||
-rw-r--r-- | kswriter/KSWriter.py | 13 |
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 |