summaryrefslogtreecommitdiffstats
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-08-09 12:26:33 +0200
commit48ba597fe93c594253f0751752fef0880029c70e (patch)
tree4023574e3fa586956ee770530200419b75eaaced
parentf2a65e959716efcef5569abe43b764b68c3fff1e (diff)
downloadptxdist-48ba597fe93c594253f0751752fef0880029c70e.tar.gz
ptxdist-48ba597fe93c594253f0751752fef0880029c70e.tar.xz
ptxdist: fix ptxdistrc handling if no old config existsptxdist-2019.07.1stable/ptxdist-2019.07.x
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> (cherry picked from commit a653df5d3f35d3936ffb1be4bc852f576c3f89f3)
-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