summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiaojuan.mao <xiaojuan.mao@samsung.com>2017-03-03 16:40:44 +0800
committerSoonKyu Park <sk7.park@samsung.com>2017-04-04 21:32:23 +0900
commit8be36481004b4440fff8cd95ae011f085b115afb (patch)
treeb3572c1d97219bb2ee11ac3f79e749b0589a669b
parentd8180c7b3e89bddf435c51bf0621568a078133f5 (diff)
downloadmic-8be36481004b4440fff8cd95ae011f085b115afb.tar.gz
mic-8be36481004b4440fff8cd95ae011f085b115afb.tar.bz2
mic-8be36481004b4440fff8cd95ae011f085b115afb.zip
Replace 'copy' to 'symbolic link' in timeznoe setting inside mic.
Change-Id: Idea80f05b7e31ec0cbc34ab627d90977b517527f
-rwxr-xr-x[-rw-r--r--]mic/kickstart/__init__.py8
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):