diff options
author | xiaojuan.mao <xiaojuan.mao@samsung.com> | 2017-03-03 16:40:44 +0800 |
---|---|---|
committer | xiaojuan.mao <xiaojuan.mao@samsung.com> | 2017-03-03 16:42:42 +0800 |
commit | 3db9cc8fbb3df467b31821495b11492b0b085bab (patch) | |
tree | b2df3ca7dfcd738f9bc662c2bb6dc503c8c4f74c | |
parent | fc94dabeac98fe99348fece489339b11bc7c5b6d (diff) | |
download | mic-3db9cc8fbb3df467b31821495b11492b0b085bab.tar.gz mic-3db9cc8fbb3df467b31821495b11492b0b085bab.tar.bz2 mic-3db9cc8fbb3df467b31821495b11492b0b085bab.zip |
Replace 'copy' to 'symbolic link' in timeznoe setting inside mic.
Change-Id: Idea80f05b7e31ec0cbc34ab627d90977b517527f
-rwxr-xr-x[-rw-r--r--] | mic/kickstart/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mic/kickstart/__init__.py b/mic/kickstart/__init__.py index a4b4f80..2ed35d0 100644..100755 --- a/mic/kickstart/__init__.py +++ b/mic/kickstart/__init__.py @@ -197,12 +197,12 @@ class TimezoneConfig(KickstartConfig): tz_source = "/usr/share/zoneinfo/%s" % (tz) tz_dest = "/etc/localtime" try: - cpcmd = fs.find_binary_inchroot('cp', self.instroot) + cpcmd = fs.find_binary_inchroot('ln', self.instroot) if cpcmd: - self.call([cpcmd, "-f", tz_source, tz_dest]) + self.call([cpcmd, "-s", tz_source, tz_dest]) else: - cpcmd = fs.find_binary_path('cp') - subprocess.call([cpcmd, "-f", + cpcmd = fs.find_binary_path('ln') + subprocess.call([cpcmd, "-s", self.path(tz_source), self.path(tz_dest)]) except (IOError, OSError), (errno, msg): |