diff --git a/docker-drbd9/Dockerfile.bionic b/docker-drbd9/Dockerfile.bionic index a47abf6..9a6b51c 100644 --- a/docker-drbd9/Dockerfile.bionic +++ b/docker-drbd9/Dockerfile.bionic @@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch curl && COPY /drbd.tar.gz / COPY /pkgs /pkgs +COPY /config-drbd.sh / COPY /entry.sh / RUN chmod +x /entry.sh diff --git a/docker-drbd9/Dockerfile.flatcar b/docker-drbd9/Dockerfile.flatcar index c031e9a..30f7ba4 100644 --- a/docker-drbd9/Dockerfile.flatcar +++ b/docker-drbd9/Dockerfile.flatcar @@ -3,6 +3,7 @@ MAINTAINER Roland Kammerer COPY /drbd.tar.gz / COPY /entry.sh / +COPY /config-drbd.sh / RUN chmod +x /entry.sh ENTRYPOINT /entry.sh diff --git a/docker-drbd9/Dockerfile.focal b/docker-drbd9/Dockerfile.focal index 91fea7f..bdfad05 100644 --- a/docker-drbd9/Dockerfile.focal +++ b/docker-drbd9/Dockerfile.focal @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch curl && COPY /drbd.tar.gz / COPY /pkgs /pkgs - +COPY /config-drbd.sh / COPY /entry.sh / RUN chmod +x /entry.sh diff --git a/docker-drbd9/Dockerfile.jammy b/docker-drbd9/Dockerfile.jammy index 1899d1d..eec6879 100644 --- a/docker-drbd9/Dockerfile.jammy +++ b/docker-drbd9/Dockerfile.jammy @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch elfutils COPY /drbd.tar.gz / COPY /pkgs /pkgs - +COPY /config-drbd.sh / COPY /entry.sh / RUN chmod +x /entry.sh ENTRYPOINT /entry.sh diff --git a/docker-drbd9/Dockerfile.kylin10 b/docker-drbd9/Dockerfile.kylin10 index 4a816cf..23266c2 100644 --- a/docker-drbd9/Dockerfile.kylin10 +++ b/docker-drbd9/Dockerfile.kylin10 @@ -38,6 +38,7 @@ RUN wget --no-check-certificate https://pkg.linbit.com/downloads/drbd/"$([[ $DRB COPY /pkgs /pkgs COPY /drbdUtils.tar.gz / COPY /install-drbdutils.sh / +COPY /config-drbd.sh / COPY /entry.sh / RUN chmod +x /entry.sh ENTRYPOINT /entry.sh diff --git a/docker-drbd9/Dockerfile.rhel7 b/docker-drbd9/Dockerfile.rhel7 index 3f6e988..f190272 100644 --- a/docker-drbd9/Dockerfile.rhel7 +++ b/docker-drbd9/Dockerfile.rhel7 @@ -26,7 +26,7 @@ RUN wget --no-check-certificate https://pkg.linbit.com/downloads/drbd/"$([[ $DRB # =lbbuild COPY /drbd.tar.gz / COPY /pkgs /pkgs - +COPY /config-drbd.sh / COPY /entry.sh / RUN chmod +x /entry.sh diff --git a/docker-drbd9/Dockerfile.rhel8 b/docker-drbd9/Dockerfile.rhel8 index f84060c..3cabe0a 100644 --- a/docker-drbd9/Dockerfile.rhel8 +++ b/docker-drbd9/Dockerfile.rhel8 @@ -46,7 +46,7 @@ RUN wget --no-check-certificate https://pkg.linbit.com/downloads/drbd/"$([[ $DRB # these are now the kmod pkgs: COPY /pkgs /pkgs - +COPY /config-drbd.sh / COPY /entry.sh / RUN chmod +x /entry.sh diff --git a/docker-drbd9/Dockerfile.rhel9 b/docker-drbd9/Dockerfile.rhel9 index 3dd96b5..587f668 100644 --- a/docker-drbd9/Dockerfile.rhel9 +++ b/docker-drbd9/Dockerfile.rhel9 @@ -37,7 +37,7 @@ RUN curl -fsSL https://pkg.linbit.com/downloads/drbd/"$([[ $DRBD_VERSION =~ ^9.0 # these are now the kmod pkgs: COPY /pkgs /pkgs - +COPY /config-drbd.sh / COPY /entry.sh / RUN chmod +x /entry.sh diff --git a/docker-drbd9/config-drbd.sh b/docker-drbd9/config-drbd.sh new file mode 100755 index 0000000..64139fb --- /dev/null +++ b/docker-drbd9/config-drbd.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +conf_file="/etc/drbd.conf" +example_file="/usr/share/doc/drbd.../drbd.conf.example" +content_to_append="include \"/etc/drbd.d/global_common.conf\";\ninclude \"/etc/drbd.d/*.res\";" +echo -e "# You can find an example in $example_file\n$content_to_append" > "$conf_file" +echo "Content successfully written to $conf_file." + +conf_file2="/etc/drbd.d/global_common.conf" +content_to_write2="global { usage-count no; }" +mkdir -p "$(dirname "$conf_file2")" +echo "$content_to_write2" > "$conf_file2" +echo "Content successfully written to $conf_file2." diff --git a/docker-drbd9/entry.sh b/docker-drbd9/entry.sh index 6b8b5f5..5355fa1 100644 --- a/docker-drbd9/entry.sh +++ b/docker-drbd9/entry.sh @@ -371,4 +371,9 @@ else fi grep -q '^drbd_transport_tcp' /proc/modules || die "Could not load DRBD kernel modules" + +cp /config-drbd.sh /pkgs_root/config-drbd.sh +nsenter --target 1 --mount --uts --ipc --net --pid chmod +x /root/config-drbd.sh +nsenter --target 1 --mount --uts --ipc --net --pid /root/config-drbd.sh + print_drbd_version_and_exit diff --git a/docker-shipper/drbd-rpms/kmod-drbd-3.10.0-1160.el7.x86_64.rpm b/docker-shipper/drbd-rpms/kmod-drbd-3.10.0-1160.el7.x86_64.rpm new file mode 100644 index 0000000..7415c20 Binary files /dev/null and b/docker-shipper/drbd-rpms/kmod-drbd-3.10.0-1160.el7.x86_64.rpm differ