use cp --reflink=auto
saves some space, if the destination is on the same filesystem on some filesystemsmaster
parent
471439f564
commit
8cd8820547
|
@ -12,7 +12,7 @@ case "$COMMAND" in
|
|||
if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
|
||||
# we found an initrd at the same place as the kernel
|
||||
# use this and don't generate a new one
|
||||
cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/initrd" \
|
||||
cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/initrd" \
|
||||
&& chown root:root "$BOOT_DIR_ABS/initrd" \
|
||||
&& chmod 0600 "$BOOT_DIR_ABS/initrd" \
|
||||
&& exit 0
|
||||
|
|
|
@ -57,7 +57,7 @@ if [[ ! -f $INITRDFILE ]]; then
|
|||
fi
|
||||
|
||||
if [[ ! -f $NEW_KERNEL_IMAGE ]]; then
|
||||
cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
||||
cp --reflink=auto "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
||||
((ret+=$?))
|
||||
fi
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ case "$COMMAND" in
|
|||
|
||||
[[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
|
||||
|
||||
if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then
|
||||
if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then
|
||||
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue