From 7bbb43badc634e976988990e4cf584b4aa30bfb7 Mon Sep 17 00:00:00 2001 From: GitExample Date: Mon, 25 Oct 2021 23:22:38 -0700 Subject: [PATCH] Update timeout to 15m for network service --- Makefile | 2 +- scripts/before-install.sh | 2 +- scripts/before-upgrade.sh | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e0bc649..78b6515 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PKG_NAME=oci-cn-auth PKG_DESCRIPTION="OCI cluster network authentication tool" PKG_VERSION=0.2.12 -PKG_RELEASE=0 +PKG_RELEASE=1 PKG_MAINTAINER="Marcin Zablocki \" PKG_ARCH=all PKG_ARCH_RPM=noarch diff --git a/scripts/before-install.sh b/scripts/before-install.sh index 54bb7d1..f5ab43b 100644 --- a/scripts/before-install.sh +++ b/scripts/before-install.sh @@ -2,7 +2,7 @@ # increase network service timeout to 15 minutes mkdir -p /etc/systemd/system/network.service.d/ -cat << EOF >> /etc/systemd/system/network.service.d/override.conf +cat <> /etc/systemd/system/network.service.d/override.conf [Service] Type=forking Restart=no diff --git a/scripts/before-upgrade.sh b/scripts/before-upgrade.sh index 562fa4b..f5c8e05 100644 --- a/scripts/before-upgrade.sh +++ b/scripts/before-upgrade.sh @@ -1,3 +1,12 @@ -#systemctl=$(which systemctl) -#${systemctl} stop oci-cn-auth.service -#${systemctl} stop oci-cn-auth.timer \ No newline at end of file +if [ ! -f /etc/systemd/system/network.service.d/override.conf ] ; then +mkdir -p /etc/systemd/system/network.service.d/ +cat <> /etc/systemd/system/network.service.d/override.conf +[Service] +Type=forking +Restart=no +TimeoutSec=15min +EOF +fi + +systemctl=$(which systemctl) +${systemctl} daemon-reload