diff options
author | 2017-02-12 13:59:38 +0300 | |
---|---|---|
committer | 2017-02-12 13:59:38 +0300 | |
commit | 04e4dbbcd6d07884afc83b86529759865c2f1ec7 (patch) | |
tree | 8b92a5e7719f836b21d41b8a9b5a6edc4ddd4ba5 | |
parent | app-admin/clsync: remove bashism from init script (diff) | |
download | bircoph-04e4dbbcd6d07884afc83b86529759865c2f1ec7.tar.gz bircoph-04e4dbbcd6d07884afc83b86529759865c2f1ec7.tar.bz2 bircoph-04e4dbbcd6d07884afc83b86529759865c2f1ec7.zip |
sys-cluster/torque: remove bashism from init script
[[ ]] construct in the client init script is replaced by [ ] to be
POSIX compliant. Since the client init script is shipped within
tarball, the tarball is updated.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
-rw-r--r-- | sys-cluster/torque/files/pbs_mom-init.d | 6 | ||||
-rw-r--r-- | sys-cluster/torque/files/pbs_server-init.d | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys-cluster/torque/files/pbs_mom-init.d b/sys-cluster/torque/files/pbs_mom-init.d index 847c090..13970fe 100644 --- a/sys-cluster/torque/files/pbs_mom-init.d +++ b/sys-cluster/torque/files/pbs_mom-init.d @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the Torque 2.5+ License . /etc/conf.d/torque @@ -27,10 +27,10 @@ start() { # check for a stale lock file, otherwise pbs_mom may fail to # start, see unicluster # 75 bug local utime unchtime - if [[ -f ${PBS_SERVER_HOME}/torque/mom_priv/mom.lock ]]; then + if [ -f ${PBS_SERVER_HOME}/torque/mom_priv/mom.lock ]; then utime=$( gawk -F "[ .]" '{ print $1 }' /proc/uptime) unchtime=$(( $(date +%s) - $(stat -c %Y ${PBS_SERVER_HOME}/mom_priv/mom.lock) )) - [[ "$utime" -lt "$unchtime" ]] && rm ${PBS_SERVER_HOME}/mom_priv/mom.lock + [ "$utime" -lt "$unchtime" ] && rm ${PBS_SERVER_HOME}/mom_priv/mom.lock fi ebegin "Starting Torque pbs_mom" diff --git a/sys-cluster/torque/files/pbs_server-init.d b/sys-cluster/torque/files/pbs_server-init.d index 981be40..bc0cdef 100644 --- a/sys-cluster/torque/files/pbs_server-init.d +++ b/sys-cluster/torque/files/pbs_server-init.d @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the Torque 2.5+ License . /etc/conf.d/torque @@ -57,8 +57,8 @@ stop() { # workaround bogus 141 code /usr/bin/qterm -t ${stop_type} ret=$? - [[ ${ret} -eq 141 ]] && ret=0 - [[ ${ret} -gt 0 ]] && { + [ ${ret} -eq 141 ] && ret=0 + [ ${ret} -gt 0 ] && { start-stop-daemon --stop -p ${PBS_SERVER_HOME}/server_priv/server.lock ret=$? } |