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

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
This commit is contained in:
Chris Lamb 2008-08-07 20:08:04 +01:00
parent 1376d237dc
commit 15ee6f0eae
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"