summaryrefslogtreecommitdiffstats
path: root/core/modules/hardware-stats/data/opt/openslx/scripts
diff options
context:
space:
mode:
authorSimon Rettberg2017-03-23 14:32:25 +0100
committerSimon Rettberg2017-03-23 14:32:25 +0100
commit7d99809bb225814b60a9726b439a34770d6640d7 (patch)
tree713d8d1eec5859f3dafc71c85ff61b661b57e6b1 /core/modules/hardware-stats/data/opt/openslx/scripts
parent[busybox] Enable applet tee (diff)
downloadmltk-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-xcore/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats8
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