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:21:43 +0100 |
commit | 447412dcb20b16a2981cdc2a96a61bb9d64b8355 (patch) | |
tree | e26023bee121c383491ab6496d069fb2a478bb7d /rc.d/init.d/functions | |
parent | a51c1b4f7dcf55b568b2ee4c2b18078849943469 (diff) | |
download | initscripts-447412dcb20b16a2981cdc2a96a61bb9d64b8355.tar initscripts-447412dcb20b16a2981cdc2a96a61bb9d64b8355.tar.gz initscripts-447412dcb20b16a2981cdc2a96a61bb9d64b8355.tar.bz2 initscripts-447412dcb20b16a2981cdc2a96a61bb9d64b8355.tar.xz initscripts-447412dcb20b16a2981cdc2a96a61bb9d64b8355.zip |
init.d/functions: fix sourcing for ksh
More info: https://bugzilla.redhat.com/show_bug.cgi?id=1518429
Diffstat (limited to 'rc.d/init.d/functions')
-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 2e3da964..a8174751 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -148,8 +148,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 |