Skip to content

Commit 8274068

Browse files
tjwatsonwraschke
authored andcommitted
Properly capture the RC from the checkpoint command
Without this fix the wrong RC was caputured from the chmod/chown commands run after the server script.
1 parent cbbce9f commit 8274068

5 files changed

Lines changed: 45 additions & 35 deletions

File tree

releases/23.0.0.8/full/helpers/build/checkpoint.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ done
99
echo "Performing checkpoint --at=$1"
1010
/opt/ol/wlp/bin/server checkpoint defaultServer --at=$1
1111

12-
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
13-
# and give the same permissions to the group.
14-
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
12+
rc=$?
13+
if [ $rc -eq 0 ]; then
14+
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
15+
# and give the same permissions to the group.
16+
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
1517

16-
# Find all files in logs/ and output/ that the current user has read/write permissions for
17-
# and give the same permissions to the group.
18-
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
18+
# Find all files in logs/ and output/ that the current user has read/write permissions for
19+
# and give the same permissions to the group.
20+
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
21+
fi
1922

20-
rc=$?
2123
exit $rc

releases/23.0.0.8/kernel-slim/helpers/build/checkpoint.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ done
99
echo "Performing checkpoint --at=$1"
1010
/opt/ol/wlp/bin/server checkpoint defaultServer --at=$1
1111

12-
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
13-
# and give the same permissions to the group.
14-
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
12+
rc=$?
13+
if [ $rc -eq 0 ]; then
14+
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
15+
# and give the same permissions to the group.
16+
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
1517

16-
# Find all files in logs/ and output/ that the current user has read/write permissions for
17-
# and give the same permissions to the group.
18-
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
18+
# Find all files in logs/ and output/ that the current user has read/write permissions for
19+
# and give the same permissions to the group.
20+
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
21+
fi
1922

20-
rc=$?
2123
exit $rc

releases/latest/beta/helpers/build/checkpoint.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ done
99
echo "Performing checkpoint --at=$1"
1010
/opt/ol/wlp/bin/server checkpoint defaultServer --at=$1
1111

12-
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
13-
# and give the same permissions to the group.
14-
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
12+
rc=$?
13+
if [ $rc -eq 0 ]; then
14+
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
15+
# and give the same permissions to the group.
16+
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
1517

16-
# Find all files in logs/ and output/ that the current user has read/write permissions for
17-
# and give the same permissions to the group.
18-
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
18+
# Find all files in logs/ and output/ that the current user has read/write permissions for
19+
# and give the same permissions to the group.
20+
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
21+
fi
1922

20-
rc=$?
2123
exit $rc

releases/latest/full/helpers/build/checkpoint.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ done
99
echo "Performing checkpoint --at=$1"
1010
/opt/ol/wlp/bin/server checkpoint defaultServer --at=$1
1111

12-
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
13-
# and give the same permissions to the group.
14-
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
12+
rc=$?
13+
if [ $rc -eq 0 ]; then
14+
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
15+
# and give the same permissions to the group.
16+
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
1517

16-
# Find all files in logs/ and output/ that the current user has read/write permissions for
17-
# and give the same permissions to the group.
18-
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
18+
# Find all files in logs/ and output/ that the current user has read/write permissions for
19+
# and give the same permissions to the group.
20+
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
21+
fi
1922

20-
rc=$?
2123
exit $rc

releases/latest/kernel-slim/helpers/build/checkpoint.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ done
99
echo "Performing checkpoint --at=$1"
1010
/opt/ol/wlp/bin/server checkpoint defaultServer --at=$1
1111

12-
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
13-
# and give the same permissions to the group.
14-
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
12+
rc=$?
13+
if [ $rc -eq 0 ]; then
14+
# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for
15+
# and give the same permissions to the group.
16+
find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \;
1517

16-
# Find all files in logs/ and output/ that the current user has read/write permissions for
17-
# and give the same permissions to the group.
18-
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
18+
# Find all files in logs/ and output/ that the current user has read/write permissions for
19+
# and give the same permissions to the group.
20+
find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \;
21+
fi
1922

20-
rc=$?
2123
exit $rc

0 commit comments

Comments
 (0)