diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-03-24 17:27:09 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-03-24 17:35:58 +0100 |
commit | b620db5ba87075031c96f4275afb63c02da70d6d (patch) | |
tree | 9d6bfcf72d71f68ec5094755e6f13800dda35a68 | |
parent | fb713a684fe8c5a0f15ab3d1ab5e4895bfc70e7d (diff) | |
download | ptxdist-b620db5ba87075031c96f4275afb63c02da70d6d.tar.gz ptxdist-b620db5ba87075031c96f4275afb63c02da70d6d.tar.xz |
ptxd_lib_dopermissions: don't try to create device nodes twice
This happens when ptxd_make_image_extract_xpkg_files() calls
ptxd_lib_dopermissions() to fix the directory permissions and for fifos if
ptxd_make_nfsd() is called more than once.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | scripts/lib/ptxd_lib_dopermissions.awk | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_lib_dopermissions.awk b/scripts/lib/ptxd_lib_dopermissions.awk index 3596121eb..b0aefe1b7 100755 --- a/scripts/lib/ptxd_lib_dopermissions.awk +++ b/scripts/lib/ptxd_lib_dopermissions.awk @@ -11,7 +11,9 @@ $1 ~ "f" { } $1 ~ "n" { - printf("mknod -m %s '.%s' %s %s %s &&\n" \ - "chown %s.%s '.%s' &&\n", \ - $5, $2, $6, $7, $8, $3, $4, $2); + printf("if [ ! \\( -b '.%s' -o -c '.%s' -o -p '.%s' \\) ]; then " \ + " mknod -m %s '.%s' %s %s %s &&\n" \ + " chown %s.%s '.%s'\n" \ + "fi &&\n", \ + $2, $2, $2, $5, $2, $6, $7, $8, $3, $4, $2); } |