KB Article #177511

RHEL and Oracle Linux do not stop the SecureTransport services during reboot/shutdown

Problem

RHEL and Oracle Linux operating systems require that a lock file exist for each started service. During reboot/shutdown this lock file indicates that the related service has to be stopped instead of killed.


Resolution

In order to enable graceful stopping of the ST services during reboot/shutdown follow the steps below:


1. On OS level navigate to the /etc/rc.d/init.d/ directory and locate SecureTransport's rc script. Its name should be something similar to rc.stransport*


2. Make a backup of the file (copy it outside of the init.d directory) and edit it as follows:


2.1 Create a lock file during boot.


Change from:


if [ -x /opt/Axway/SecureTransport/bin/start_all ]; then
    su - root -c "/opt/Axway/SecureTransport/bin/start_all -boot"
fi


to:


if [ -x /opt/Axway/SecureTransport/bin/start_all ]; then
    su - root -c "/opt/Axway/SecureTransport/bin/start_all -boot"
    touch /var/lock/subsys/rc.stransport
fi


IMPORTANT: The lock file must have the same name like the RC script.


2.2 Delete the lock file during reboot/shutdown


Change from:


if [ -x /opt/Axway/SecureTransport/bin/stop_all ]; then
    su - root -c "/opt/Axway/SecureTransport/bin/stop_all"
fi


to:


if [ -x /opt/Axway/SecureTransport/bin/stop_all ]; then
    su - root -c "/opt/Axway/SecureTransport/bin/stop_all"
    rm -f /var/lock/subsys/rc.stransport
fi


3. Increase the shutdown priority in order to stop SecureTransport's services before all other services:


3.1. Navigate to the /etc/rc0.d/ directory and locate the ST script. It should be with name similar to K99rc.stransport


3.2. Rename the file from K99rc.stransport to K01rc.stransport. The K99 is the script's stop priority, so by renaming the file we are switching it to K01 - a higher priority.


3.3. Navigate to the /etc/rc6.d/ directory and repeat step 3.2.


Now the SecureTransport services should be stopped during reboot/shutdown and the operating system should stop them before all other services.