[Pkg-libvirt-commits] [libguestfs] 35/59: random_seed: Don't try to create random seed if no parent directory.
Hilko Bengen
bengen at moszumanska.debian.org
Sun May 3 21:26:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit b70aec11c649b3c5ff22bc0f6a64e794ca3e7515
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Apr 27 20:28:26 2015 +0100
random_seed: Don't try to create random seed if no parent directory.
Partial fix for https://bugzilla.redhat.com/show_bug.cgi?id=1215803
---
customize/random_seed.ml | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/customize/random_seed.ml b/customize/random_seed.ml
index 8ccf8c4..34a7af7 100644
--- a/customize/random_seed.ml
+++ b/customize/random_seed.ml
@@ -56,8 +56,13 @@ let rec set_random_seed (g : Guestfs.guestfs) root =
None in
match file with
| Some file ->
- make_random_seed_file g file;
- created := true
+ let dir =
+ let i = String.rindex file '/' in
+ String.sub file 0 i in
+ if g#is_dir dir then (
+ make_random_seed_file g file;
+ created := true
+ )
| None -> ()
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list