Skip to content

Commit d0e9036

Browse files
committed
Remove SCL definition from whole container.
test/run also checks if SCL is running. It is not valid anymore Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent ac49018 commit d0e9036

File tree

5 files changed

+15
-49
lines changed

5 files changed

+15
-49
lines changed

2.4-micro/root/usr/libexec/httpd-prepare

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@ set -e
44

55
source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh
66

7-
# compatibility symlinks so we hide SCL paths
8-
if [ -v HTTPD_SCL ] ; then
9-
# /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
10-
mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
11-
ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd
12-
13-
# /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
14-
mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
15-
ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd
16-
17-
# /opt/rh/httpd24/root/var/www will be symlink to /var/www
18-
rm -rf /var/www
19-
mv /opt/rh/httpd24/root/var/www /var/www
20-
ln -s /var/www /opt/rh/httpd24/root/var/www
21-
fi
22-
237
mkdir -p ${HTTPD_CONFIGURATION_PATH}
248
chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
259
chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}

2.4-micro/s2i/bin/usage

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#!/bin/sh
22

33
DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
4-
NAMESPACE=centos
5-
[[ $DISTRO =~ rhel* ]] && NAMESPACE=rhscl
4+
NAMESPACE=sclorg
5+
if [[ $DISTRO =~ rhel* ]]; then
6+
NAMESPACE=rhel10
7+
DISTRO=""
8+
else
9+
DISTRO="-c10s"
10+
fi
611

712
cat <<EOF
813
This is a S2I ${IMAGE_DESCRIPTION} ${DISTRO} base image:

2.4/root/usr/libexec/httpd-prepare

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@ set -e
44

55
source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh
66

7-
# compatibility symlinks so we hide SCL paths
8-
if [ -v HTTPD_SCL ] ; then
9-
# /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
10-
mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
11-
ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd
12-
13-
# /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
14-
mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
15-
ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd
16-
17-
# /opt/rh/httpd24/root/var/www will be symlink to /var/www
18-
rm -rf /var/www
19-
mv /opt/rh/httpd24/root/var/www /var/www
20-
ln -s /var/www /opt/rh/httpd24/root/var/www
21-
fi
22-
237
mkdir -p ${HTTPD_CONFIGURATION_PATH}
248
chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
259
chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}

2.4/s2i/bin/usage

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#!/bin/sh
22

33
DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
4-
NAMESPACE=centos
5-
[[ $DISTRO =~ rhel* ]] && NAMESPACE=rhscl
4+
NAMESPACE=sclorg
5+
if [[ $DISTRO =~ rhel* ]]; then
6+
NAMESPACE=rhel10
7+
DISTRO=""
8+
else
9+
DISTRO="-c10s"
10+
fi
611

712
cat <<EOF
813
This is a S2I ${IMAGE_DESCRIPTION} ${DISTRO} base image:

test/run

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ test_dir="$(readlink -f $(dirname "${BASH_SOURCE[0]}"))"
88

99
. "$test_dir/test-lib.sh"
1010

11-
function _container_is_scl() {
12-
docker inspect --format='{{.Config.Env}}' "${1-$IMAGE_NAME}" | grep -q HTTPD_SCL
13-
return $?
14-
}
15-
1611
function run() {
1712
cmd="$1"
1813
expected_res="${2:-0}"
@@ -49,11 +44,7 @@ function run_as_root_test() {
4944

5045
function run_log_to_volume_test() {
5146
_run_invalid_log_volume_test
52-
if _container_is_scl ; then
53-
_run_log_to_volume_test old /var/log/httpd24
54-
else
55-
_run_log_to_volume_test new /var/log/httpd
56-
fi
47+
_run_log_to_volume_test new /var/log/httpd
5748
}
5849

5950
function _run_log_to_volume_test() {
@@ -86,9 +77,6 @@ function _run_invalid_log_volume_test() {
8677

8778

8879
function run_data_volume_test() {
89-
if _container_is_scl ; then
90-
_run_data_volume_test old /opt/rh/httpd24/root/var/www
91-
fi
9280
_run_data_volume_test new /var/www
9381
}
9482

0 commit comments

Comments
 (0)