Bug#686703: mdadm: super0: do not override uuid with homehost
Michael Tokarev
mjt at tls.msk.ru
Sat Oct 20 15:40:02 UTC 2012
When --uuid is specified in the command line, even for v0.90
superblock we override last portion of uuid with data from
--homehost, which is wrong (and disagrees with the manpage).
Only use homehost in super0 if no uuid is specified.
Signed-off-By: Michael Tokarev <mjt at tls.msk.ru>
diff --git a/super0.c b/super0.c
index 1375799..ca4c082 100644
--- a/super0.c
+++ b/super0.c
@@ -657,7 +657,7 @@ static int init_super0(struct supertype *st, mdu_array_info_t *info,
if (rfd >= 0)
close(rfd);
}
- if (homehost) {
+ if (homehost && !uuid) {
char buf[20];
char *hash = sha1_buffer(homehost,
strlen(homehost),
More information about the pkg-mdadm-devel
mailing list