Test whether to use hard-links when caching d-i downloads.

This commit is contained in:
Chris Lamb 2008-08-07 20:08:04 +01:00 committed by Daniel Baumann
parent b07f1ccc01
commit 6538fac66f
1 changed files with 6 additions and 1 deletions

View File

@ -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"