Copy ks setting lang to file /etc/config/mic_language for other use
authoryyh <yyh@123.com>
Mon, 13 Mar 2017 10:14:23 +0000 (18:14 +0800)
committeryyh <yyh@123.com>
Tue, 14 Mar 2017 09:35:05 +0000 (17:35 +0800)
Change-Id: Iaa62e8a2cc74bd868043044636b2ff1172036d0d

mic/kickstart/__init__.py

index 2ed35d0..fb0e4d8 100755 (executable)
@@ -167,6 +167,12 @@ class LanguageConfig(KickstartConfig):
             f.write("LANG=\"" + kslang.lang + "\"\n")
             f.close()
 
+            #cp ks lang setting to other file, then can access the file in %post section
+            fs.makedirs(self.path("/etc/config"))
+            f = open(self.path("/etc/config/mic_language"), "w+")
+            f.write("LANG=\"" + kslang.lang + "\"\n")
+            f.close()
+
 class KeyboardConfig(KickstartConfig):
     """A class to apply a kickstart keyboard configuration to a system."""
     @apply_wrapper