File: 03-disable-cygwin-detection.patch

package info (click to toggle)
zookeeper 3.9.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,872 kB
  • sloc: java: 122,772; cpp: 14,071; ansic: 12,468; javascript: 11,754; xml: 4,965; python: 2,829; sh: 2,444; makefile: 241; perl: 114
file content (36 lines) | stat: -rw-r--r-- 835 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Description: Disable detection of cygwin under Debian installs
 as this is not compatible with the way the environment is 
 managed through alternatives.
 .
 TODO - review alongside use of alternatives for managing 
 configuration.
Author: Akira Kitada <akitada@gmail.com>
Forwarded: not-needed

--- a/bin/zkServer.sh
+++ b/bin/zkServer.sh
@@ -97,15 +97,6 @@
     ZOOCFG="$2"
 fi
 
-if $cygwin
-then
-    ZOOCFG=`cygpath -wp "$ZOOCFG"`
-    # cygwin has a "kill" in the shell itself, gets confused
-    KILL=/bin/kill
-else
-    KILL=kill
-fi
-
 echo "Using config: $ZOOCFG" >&2
 
 case "$OSTYPE" in
@@ -219,7 +210,7 @@
     then
       echo "no zookeeper to stop (could not find file $ZOOPIDFILE)"
     else
-      $KILL $(cat "$ZOOPIDFILE")
+      kill $(cat "$ZOOPIDFILE")
       rm "$ZOOPIDFILE"
       sleep 1
       echo STOPPED