test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh

Print this page




  28 # Source in this GeneratePropertyPassword.sh and call the function
  29 # generatePropertyPasswordFiles. 
  30 # Call restoreFilePermissions to restore file permissions after the test completes
  31 #
  32 
  33 
  34 OS=`uname -s`
  35 UMASK=`umask`
  36 
  37 case $OS in
  38 SunOS | Linux)
  39     PATHSEP=":"
  40     FILESEP="/"
  41     DFILESEP=$FILESEP
  42     TMP_FILE=${TESTCLASSES}${FILESEP}${TESTCLASS}.sed.tmpfile
  43 
  44 cat <<EOF > ${TMP_FILE}
  45 s^@TEST-SRC@/^${TESTCLASSES}${DFILESEP}^g
  46 EOF
  47     ;;
  48 Windows_95 | Windows_98 | Windows_NT | Windows_ME)
  49     PATHSEP=";"
  50     FILESEP="\\"
  51     DFILESEP=$FILESEP$FILESEP
  52     TMP_FILE=${TESTCLASSES}${FILESEP}${TESTCLASS}.sed.tmpfile
  53 
  54 cat <<EOF > ${TMP_FILE}0
  55 s^@TEST-SRC@/^${TESTCLASSES}${DFILESEP}^g
  56 EOF
  57     # Need to put double backslash in the .properties files
  58     cat ${TMP_FILE}0 | sed -e 's^\\\\^ZZZZ^g' | \
  59         sed -e 's^\\^ZZZZ^g' | \
  60         sed -e 's^ZZZZ^\\\\\\\\^g' > ${TMP_FILE}
  61 
  62     if [ "$OS" = "Windows_NT" ]; then
  63         USER=`id -u -n`
  64         CACLS="$SystemRoot/system32/cacls.exe"
  65         REVOKEALL="${TESTSRC}/../../windows/revokeall.exe"
  66         if [ ! -f "$REVOKEALL" ] ; then
  67             echo "$REVOKEALL missing"
  68             exit 1




  28 # Source in this GeneratePropertyPassword.sh and call the function
  29 # generatePropertyPasswordFiles. 
  30 # Call restoreFilePermissions to restore file permissions after the test completes
  31 #
  32 
  33 
  34 OS=`uname -s`
  35 UMASK=`umask`
  36 
  37 case $OS in
  38 SunOS | Linux)
  39     PATHSEP=":"
  40     FILESEP="/"
  41     DFILESEP=$FILESEP
  42     TMP_FILE=${TESTCLASSES}${FILESEP}${TESTCLASS}.sed.tmpfile
  43 
  44 cat <<EOF > ${TMP_FILE}
  45 s^@TEST-SRC@/^${TESTCLASSES}${DFILESEP}^g
  46 EOF
  47     ;;
  48 Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN*)
  49     PATHSEP=";"
  50     FILESEP="\\"
  51     DFILESEP=$FILESEP$FILESEP
  52     TMP_FILE=${TESTCLASSES}${FILESEP}${TESTCLASS}.sed.tmpfile
  53 
  54 cat <<EOF > ${TMP_FILE}0
  55 s^@TEST-SRC@/^${TESTCLASSES}${DFILESEP}^g
  56 EOF
  57     # Need to put double backslash in the .properties files
  58     cat ${TMP_FILE}0 | sed -e 's^\\\\^ZZZZ^g' | \
  59         sed -e 's^\\^ZZZZ^g' | \
  60         sed -e 's^ZZZZ^\\\\\\\\^g' > ${TMP_FILE}
  61 
  62     if [ "$OS" = "Windows_NT" ]; then
  63         USER=`id -u -n`
  64         CACLS="$SystemRoot/system32/cacls.exe"
  65         REVOKEALL="${TESTSRC}/../../windows/revokeall.exe"
  66         if [ ! -f "$REVOKEALL" ] ; then
  67             echo "$REVOKEALL missing"
  68             exit 1