diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-08-07 20:08:04 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:37 +0100 |
commit | 6538fac66feaa5cb7957013a29da704a09256e3f (patch) | |
tree | d8cc94e5900c40665f7e5fd8776216c198ce39cf | |
parent | b07f1ccc01ff033baf6fb2ccef48778957b3f89e (diff) | |
download | vyos-live-build-6538fac66feaa5cb7957013a29da704a09256e3f.tar.gz vyos-live-build-6538fac66feaa5cb7957013a29da704a09256e3f.zip |
Test whether to use hard-links when caching d-i downloads.
-rwxr-xr-x | helpers/lh_binary_debian-installer | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index c0bb74c7f..e579eec28 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -216,7 +216,12 @@ Download_file () { fi fi - cp -fl "${_LH_CACHE_FILE}" "${_LH_TARGET}" + if [ "$(stat --printf %d "${_LH_CACHE_DIR}")" = "$(stat --printf %d ./)" ] + then + CP_OPTIONS="-l" + fi + + cp -f ${CP_OPTIONS} -- "${_LH_CACHE_FILE}" "${_LH_TARGET}" } VMLINUZ_DI="vmlinuz" |