diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-01-17 10:29:08 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-01-17 10:29:08 -0800 |
commit | dff5ee18debb328ca95a0140ec18576de9d91598 (patch) | |
tree | 2232c5b482aa3314e9fb6c4c3cabd5c09ac2f530 /spec | |
parent | e32be48e2ddd4bef2bad482687264f7cd8567b68 (diff) | |
download | chef-dff5ee18debb328ca95a0140ec18576de9d91598.tar.gz |
use TMPDIR correctly in initscriptlcg/hardocde-tmpdir-aix-spec
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/functional/assets/chefinittest | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/functional/assets/chefinittest b/spec/functional/assets/chefinittest index 79e064cd5f..2539b018f0 100755 --- a/spec/functional/assets/chefinittest +++ b/spec/functional/assets/chefinittest @@ -1,15 +1,17 @@ #!/bin/ksh +TMPDIR="${TMPDIR:-/tmp}" + function create_chef_txt { - touch /tmp/chefinittest.txt + touch $TMPDIR/chefinittest.txt } function delete_chef_txt { - rm /tmp/chefinittest.txt + rm $TMPDIR/chefinittest.txt } function rename_chef_txt { - mv /tmp/chefinittest.txt /tmp/$1 + mv $TMPDIR/chefinittest.txt /tmp/$1 } case "$1" in @@ -20,7 +22,7 @@ stop ) delete_chef_txt ;; status ) - [ -f /tmp/chefinittest.txt ] || [ -f /tmp/chefinittest_reload.txt ] || [ -f /tmp/chefinittest_restart.txt ] + [ -f $TMPDIR/chefinittest.txt ] || [ -f $TMPDIR/chefinittest_reload.txt ] || [ -f $TMPDIR/chefinittest_restart.txt ] ;; reload ) rename_chef_txt "chefinittest_reload.txt" |