You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2017/01/21 02:13:33 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-2450] copy file error for python-installer/templates

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master f87198f32 -> 8f607980d


[TRAFODION-2450] copy file error for python-installer/templates


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/13973b21
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/13973b21
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/13973b21

Branch: refs/heads/master
Commit: 13973b218cb5701f090356c7f3f4807459705834
Parents: c572f63
Author: Eason <hf...@gmail.com>
Authored: Mon Jan 16 23:58:43 2017 +0800
Committer: Eason <hf...@gmail.com>
Committed: Wed Jan 18 08:52:32 2017 +0800

----------------------------------------------------------------------
 install/python-installer/scripts/common.py     | 1 -
 install/python-installer/scripts/traf_setup.py | 6 ++++++
 install/python-installer/scripts/traf_user.py  | 5 -----
 install/python-installer/scripts/wrapper.py    | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/13973b21/install/python-installer/scripts/common.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/common.py b/install/python-installer/scripts/common.py
index 68c4a6a..daa0944 100644
--- a/install/python-installer/scripts/common.py
+++ b/install/python-installer/scripts/common.py
@@ -45,7 +45,6 @@ INSTALLER_LOC = re.search('(.*)/\w+',os.path.dirname(os.path.abspath(__file__)))
 
 CONFIG_DIR = INSTALLER_LOC + '/configs'
 SCRIPTS_DIR = INSTALLER_LOC + '/scripts'
-TEMPLATES_DIR = INSTALLER_LOC + '/templates'
 
 USER_PROMPT_FILE = CONFIG_DIR + '/prompt.json'
 SCRCFG_FILE = CONFIG_DIR + '/script.json'

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/13973b21/install/python-installer/scripts/traf_setup.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/traf_setup.py b/install/python-installer/scripts/traf_setup.py
index c62e505..a35ab93 100755
--- a/install/python-installer/scripts/traf_setup.py
+++ b/install/python-installer/scripts/traf_setup.py
@@ -55,6 +55,12 @@ def run():
     run_cmd('sysctl -w kernel.pid_max=65535 2>&1 > /dev/null')
     run_cmd('echo "kernel.pid_max=65535" >> /etc/sysctl.conf')
 
+    ### copy trafodion bashrc ###
+    BASHRC_TEMPLATE = '%s/sysinstall/home/trafodion/.bashrc' % TRAF_HOME
+    BASHRC_FILE = '%s/%s/.bashrc' % (HOME_DIR, TRAF_USER)
+    run_cmd('cp -f %s %s' % (BASHRC_TEMPLATE, BASHRC_FILE))
+    run_cmd('chown -R %s:%s %s*' % (TRAF_USER, TRAF_USER, BASHRC_FILE))
+
     ### copy init script ###
     init_script = '%s/sysinstall/etc/init.d/trafodion' % TRAF_HOME
     if os.path.exists(init_script):

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/13973b21/install/python-installer/scripts/traf_user.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/traf_user.py b/install/python-installer/scripts/traf_user.py
index ec5c250..d7d0c66 100755
--- a/install/python-installer/scripts/traf_user.py
+++ b/install/python-installer/scripts/traf_user.py
@@ -59,8 +59,6 @@ def run():
     KEY_FILE = '/tmp/id_rsa'
     AUTH_KEY_FILE = '%s/.ssh/authorized_keys' % TRAF_USER_DIR
     SSH_CFG_FILE = '%s/.ssh/config' % TRAF_USER_DIR
-    BASHRC_TEMPLATE = '%s/sqf/sysinstall/home/trafodion/.bashrc' % TRAF_HOME
-    BASHRC_FILE = '%s/.bashrc' % TRAF_USER_DIR
     ULIMITS_FILE = '/etc/security/limits.d/%s.conf' % TRAF_USER
     HSPERFDATA_FILE = '/tmp/hsperfdata_trafodion'
 
@@ -70,9 +68,6 @@ def run():
 
     if not cmd_output('getent passwd %s' % TRAF_USER):
         run_cmd('useradd --shell /bin/bash -m %s -g %s --home %s --password "$(openssl passwd %s)"' % (TRAF_USER, TRAF_GROUP, TRAF_USER_DIR, TRAF_PWD))
-        # copy bashrc to trafodion's home only if user doesn't exist
-        run_cmd('cp %s %s' % (BASHRC_TEMPLATE, BASHRC_FILE))
-        run_cmd('chown -R %s:%s %s*' % (TRAF_USER, TRAF_GROUP, BASHRC_FILE))
     elif not os.path.exists(TRAF_USER_DIR):
         run_cmd('mkdir -p %s' % TRAF_USER_DIR)
         run_cmd('chmod 700 %s' % TRAF_USER_DIR)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/13973b21/install/python-installer/scripts/wrapper.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/wrapper.py b/install/python-installer/scripts/wrapper.py
index 43f20ee..cc34c3f 100644
--- a/install/python-installer/scripts/wrapper.py
+++ b/install/python-installer/scripts/wrapper.py
@@ -29,7 +29,7 @@ from glob import glob
 from threading import Thread
 from common import err_m, run_cmd, time_elapse, get_logger, Remote, \
                    ParseJson, INSTALLER_LOC, TMP_DIR, SCRCFG_FILE, \
-                   CONFIG_DIR, SCRIPTS_DIR, TEMPLATES_DIR
+                   CONFIG_DIR, SCRIPTS_DIR
 
 class RemoteRun(Remote):
     """ run commands or scripts remotely using ssh """
@@ -44,7 +44,7 @@ class RemoteRun(Remote):
         self.execute('mkdir -p %s' % TMP_DIR)
 
         # copy all needed files to remote host
-        all_files = [CONFIG_DIR, SCRIPTS_DIR, TEMPLATES_DIR]
+        all_files = [CONFIG_DIR, SCRIPTS_DIR]
 
         self.copy(all_files, remote_folder=TMP_DIR)
 


[2/2] incubator-trafodion git commit: Merge Fix for [TRAFODION-2450] copy file error for python-installer/templates

Posted by li...@apache.org.
Merge Fix for [TRAFODION-2450] copy file error for python-installer/templates


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/8f607980
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/8f607980
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/8f607980

Branch: refs/heads/master
Commit: 8f607980df3306ddc81d6b6debb97eda14522ae8
Parents: f87198f 13973b2
Author: Liu Ming <ov...@sina.com>
Authored: Sat Jan 21 02:13:09 2017 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Sat Jan 21 02:13:09 2017 +0000

----------------------------------------------------------------------
 install/python-installer/scripts/common.py     | 1 -
 install/python-installer/scripts/traf_setup.py | 6 ++++++
 install/python-installer/scripts/traf_user.py  | 5 -----
 install/python-installer/scripts/wrapper.py    | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------