summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-07-18 10:20:53 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-07-18 10:21:05 +0200
commita653df5d3f35d3936ffb1be4bc852f576c3f89f3 (patch)
tree4258e9706220e6eeee00a85315936a967d093771 /bin
parent00b9cd3c50ae1279cfeccd725e9d7cbfb0722d66 (diff)
downloadptxdist-a653df5d3f35d3936ffb1be4bc852f576c3f89f3.tar.gz
ptxdist-a653df5d3f35d3936ffb1be4bc852f576c3f89f3.tar.xz
ptxdist: fix ptxdistrc handling if no old config exists
tmpptxrc is always set, but the file may not exist. So check for existence instead. Without this, ptxdist fails to start if ~/.ptxdist does not exist, or is empty. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 65fdf11c6..d7bf4d5ff 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2251,7 +2251,7 @@ ensure_ptxrc() {
tmp_month="$(printf "%02d" $[tmp_month-1])"
fi
done
- if [ -z "${tmpptxrc}" ]; then
+ if [ ! -e "${tmpptxrc}" ]; then
tmpptxrc="${rc_default}"
fi
else