diff options
author | Simon Rettberg | 2017-03-23 14:32:25 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-03-23 14:32:25 +0100 |
commit | 7d99809bb225814b60a9726b439a34770d6640d7 (patch) | |
tree | 713d8d1eec5859f3dafc71c85ff61b661b57e6b1 /core/modules/hardware-stats/data/opt/openslx/scripts | |
parent | [busybox] Enable applet tee (diff) | |
download | mltk-7d99809bb225814b60a9726b439a34770d6640d7.tar.gz mltk-7d99809bb225814b60a9726b439a34770d6640d7.tar.xz mltk-7d99809bb225814b60a9726b439a34770d6640d7.zip |
[hardware-stats] Check for mktemp binary before trying to call it
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/scripts')
-rwxr-xr-x | core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats index 3aa7386e..e87c41e1 100755 --- a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats +++ b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats @@ -13,9 +13,11 @@ chmod 0600 "/tmp/hw-delete-list" || exit 11 echo -n "" > "/tmp/hw-delete-list" || exit 12 mktemp() { - local FILE - FILE=$(/bin/mktemp) - if [ -z "$FILE" ]; then + local FILE= + if [ -x /bin/mktemp ]; then + FILE=$(/bin/mktemp) + fi + if [ -z "$FILE" ] && [ -x /opt/openslx/bin/mktemp ]; then FILE=$(/opt/openslx/bin/mktemp) fi if [ -z "$FILE" ]; then |