diff --git a/scripts/before-install.sh b/scripts/before-install.sh index e69de29..54bb7d1 100644 --- a/scripts/before-install.sh +++ b/scripts/before-install.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# 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 +[Service] +Type=forking +Restart=no +TimeoutSec=15min +EOF diff --git a/scripts/before-remove.sh b/scripts/before-remove.sh index 0aad8d5..9b0beeb 100644 --- a/scripts/before-remove.sh +++ b/scripts/before-remove.sh @@ -1,6 +1,10 @@ +# remove timeout override +rm -rf /etc/systemd/system/network.service.d/ + systemctl=$(which systemctl) ${systemctl} stop oci-cn-auth.timer ${systemctl} stop oci-cn-auth.service ${systemctl} disable oci-cn-auth.timer ${systemctl} disable oci-cn-auth.service -${systemctl} reset-failed \ No newline at end of file +${systemctl} reset-failed +