You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2014/02/06 23:50:47 UTC

git commit: KNOX-249: Fix issues with shell scripts and home directory.

Updated Branches:
  refs/heads/master af4d63ceb -> bcccb1657


KNOX-249: Fix issues with shell scripts and home directory.


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

Branch: refs/heads/master
Commit: bcccb165792b69319e8e44178b6ed0df92995bd0
Parents: af4d63c
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Thu Feb 6 17:49:32 2014 -0500
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Thu Feb 6 17:49:32 2014 -0500

----------------------------------------------------------------------
 gateway-release/home/bin/gateway.sh  |  2 +-
 gateway-release/home/bin/ldap.sh     | 18 ++++++------------
 gateway-release/home/logs/.gitignore |  4 ++++
 gateway-release/home/pids/.gitignore |  4 ++++
 4 files changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/bcccb165/gateway-release/home/bin/gateway.sh
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/gateway.sh b/gateway-release/home/bin/gateway.sh
index 04351c1..9d7cff0 100755
--- a/gateway-release/home/bin/gateway.sh
+++ b/gateway-release/home/bin/gateway.sh
@@ -139,7 +139,7 @@ function appStop {
      return 0
    fi
   
-   printf "Stopping $APP_LABEL with $APP_PID "
+   printf "Stopping $APP_LABEL with PID $APP_PID "
    appKill $APP_PID >>$APP_OUT_FILE 2>>$APP_ERR_FILE
 
    if [ $? -ne 0 ]; then 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/bcccb165/gateway-release/home/bin/ldap.sh
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/ldap.sh b/gateway-release/home/bin/ldap.sh
index fc2cef3..51a615f 100755
--- a/gateway-release/home/bin/ldap.sh
+++ b/gateway-release/home/bin/ldap.sh
@@ -50,12 +50,9 @@ APP_MEM_OPTS=""
 # The app's debugging options
 APP_DBG_OPTS=""
 
-# Start, stop, status, clean or setup
+# Start, stop, status, clean
 APP_LAUNCH_COMMAND=$1
 
-# User Name for setup parameter
-APP_LAUNCH_USER=$2
-
 # The app's PID
 APP_PID=0
 
@@ -90,9 +87,6 @@ function main {
       clean) 
          appClean
          ;;
-      setup) 
-         setupEnv $APP_LAUNCH_USER
-         ;;
       *)
          printHelp
          ;;
@@ -205,7 +199,7 @@ function appKill {
 # Returns 0 if the app is running and sets the $APP_PID variable.
 function getPID {
    if [ ! -d $APP_PID_DIR ]; then
-      printf "Can't find pid dir.  Run sudo $0 setup.\n"
+      printf "Can't find pid dir.\n"
       exit 1
    fi
    if [ ! -f $APP_PID_FILE ]; then
@@ -231,7 +225,7 @@ function appIsRunning {
 
 function createLogFiles {
    if [ ! -d "$APP_LOG_DIR" ]; then
-      printf "Can't find log dir.  Run sudo $0 setup.\n"
+      printf "Can't find log dir.\n"
       exit 1
    fi
    if [ ! -f "$APP_OUT_FILE" ]; then touch $APP_OUT_FILE; fi
@@ -255,19 +249,19 @@ function setDirPermission {
 
    if [ ! -d "$dirName" ]; then mkdir -p $dirName; fi
    if [ $? -ne 0 ]; then
-      printf "Can't access or create \"$dirName\" folder.  Run sudo $0 setup.\n"
+      printf "Can't access or create \"$dirName\" folder.\n"
       exit 1
    fi
 
    chown -f $userName $dirName
    if [ $? -ne 0 ]; then
-      printf "Can't change owner of \"$dirName\" folder to \"$userName\" user.  Run command with sudo.\n"
+      printf "Can't change owner of \"$dirName\" folder to \"$userName\" user.\n"
       exit 1
    fi
 
    chmod o=rwx $dirName 
    if [ $? -ne 0 ]; then
-      printf "Can't grant rwx permission to \"$userName\" user on \"$dirName\".  Run command with sudo.\n"
+      printf "Can't grant rwx permission to \"$userName\" user on \"$dirName\".\n"
       exit 1
    fi
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/bcccb165/gateway-release/home/logs/.gitignore
----------------------------------------------------------------------
diff --git a/gateway-release/home/logs/.gitignore b/gateway-release/home/logs/.gitignore
new file mode 100644
index 0000000..5e7d273
--- /dev/null
+++ b/gateway-release/home/logs/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/bcccb165/gateway-release/home/pids/.gitignore
----------------------------------------------------------------------
diff --git a/gateway-release/home/pids/.gitignore b/gateway-release/home/pids/.gitignore
new file mode 100644
index 0000000..5e7d273
--- /dev/null
+++ b/gateway-release/home/pids/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore