aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kaspar [Dee'Kej] <dkaspar@redhat.com>2018-02-13 14:03:30 +0100
committerDee'Kej <deekej@linuxmail.org>2018-02-13 14:29:12 +0100
commit628f1268129b31c27ec176649893ad6b63689a60 (patch)
tree2cbd3d02e047735461332b4219abd06f6ceb66ac
parent3f7368cf2615978fc4b89b63613ada20bafb6124 (diff)
downloadinitscripts-628f1268129b31c27ec176649893ad6b63689a60.tar
initscripts-628f1268129b31c27ec176649893ad6b63689a60.tar.gz
initscripts-628f1268129b31c27ec176649893ad6b63689a60.tar.bz2
initscripts-628f1268129b31c27ec176649893ad6b63689a60.tar.xz
initscripts-628f1268129b31c27ec176649893ad6b63689a60.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/functions9
1 files changed, 7 insertions, 2 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index e1d6ecd5..2e192a61 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -111,8 +111,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