builder: templates: Set 0644 permissions on final disk image.

I think libvirt or virt-install has changed recently so that it
creates disk images which are not public readable.  This has lead to
me uploading two sets of non-readable templates for virt-builder.  Set
the mode explicitly to 0644.

Thanks: Laine Stump, Jacob Shivers.
This commit is contained in:
Richard W.M. Jones
2018-11-06 21:44:42 +00:00
parent c7343a29dd
commit 3430c2dd65

View File

@@ -275,6 +275,10 @@ let rec main () =
if Sys.command cmd <> 0 then exit 1;
let output = output ^ ".xz" in
(* Set public readable permissions on the final file. *)
let cmd = sprintf "chmod 0644 %s" (quote output) in
if Sys.command cmd <> 0 then exit 1;
printf "Template completed: %s\n%!" output;
(* Construct the index fragment, but don't create this for the private