diff mbox

[OSSTEST,02/11] ts-freebsd-host-install: fix image permissions

Message ID 20170728152637.20301-3-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monne July 28, 2017, 3:26 p.m. UTC
Make sure images copied to the tftp path have the right permissions,
so use dd instead of cp, which will obviously not preserve the
original permissions.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 ts-freebsd-host-install | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ian Jackson July 28, 2017, 3:28 p.m. UTC | #1
Roger Pau Monne writes ("[PATCH OSSTEST 02/11] ts-freebsd-host-install: fix image permissions"):
> Make sure images copied to the tftp path have the right permissions,
> so use dd instead of cp, which will obviously not preserve the
> original permissions.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install
index 321763b0..483b9aec 100755
--- a/ts-freebsd-host-install
+++ b/ts-freebsd-host-install
@@ -76,7 +76,8 @@  targetpath=$4
 cd $basedir
 mkdir -p `dirname $sharedpath`
 if [ ! -f $sharedpath ]; then
-    cp $imagepath $sharedpath.tmp
+    rm $sharedpath.tmp
+    dd if=$imagepath of=$sharedpath.tmp
     mv $sharedpath.tmp $sharedpath
 fi
 rm -f $targetpath