diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2018-02-13 14:03:30 +0100 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2018-02-13 14:26:25 +0100 |
commit | b1c8bff38d916ade25ed8f880899ed691354b990 (patch) | |
tree | 4464caf2824533338e70adcbb9291ef1e9588e85 | |
parent | e187c18568b30287d5af31dc59b6b8ce7cfecce1 (diff) | |
download | initscripts-b1c8bff38d916ade25ed8f880899ed691354b990.tar initscripts-b1c8bff38d916ade25ed8f880899ed691354b990.tar.gz initscripts-b1c8bff38d916ade25ed8f880899ed691354b990.tar.bz2 initscripts-b1c8bff38d916ade25ed8f880899ed691354b990.tar.xz initscripts-b1c8bff38d916ade25ed8f880899ed691354b990.zip |
init.d/functions: fix sourcing for ksh
More info: https://bugzilla.redhat.com/show_bug.cgi?id=1518429
-rw-r--r-- | rc.d/init.d/functions | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index b3d03fd6..b89060be 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -139,8 +139,13 @@ __kill_pids_term_kill() { local try=0 local delay=3; local pid= - local stat=($(< /proc/self/stat)) - local base_stime=${stat[21]} + local stat= + local base_stime= + + # We can't initialize stat & base_stime on the same line where 'local' + # keyword is, otherwise the sourcing of this file will fail for ksh... + stat=($(< /proc/self/stat)) + base_stime=${stat[21]} if [ "$1" = "-d" ]; then delay=$2 |