summaryrefslogtreecommitdiffstats
path: root/genimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'genimage.c')
-rw-r--r--genimage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/genimage.c b/genimage.c
index fadfc07..d7014cf 100644
--- a/genimage.c
+++ b/genimage.c
@@ -432,6 +432,16 @@ static int collect_mountpoints(void)
return ret;
}
+ /*
+ * After the mv/mkdir of the mountpoints the timestamps of the
+ * mountpoint and all parent dirs are changed. Fix that here.
+ */
+ ret = systemp(NULL,
+ "find '%s/root' -depth -type d -printf '%%P\\0' | xargs -0 -I {} touch -r '%s/{}' '%s/root/{}'",
+ tmppath(), rootpath(), tmppath());
+ if (ret)
+ return ret;
+
return 0;
}