Skip to content

Commit

Permalink
Use "rsync -SHaAX" to copy the cached rootfs into place
Browse files Browse the repository at this point in the history
(updated by Serge to also handle hte new lxc-fedora{-legacy{.in
templates)

Signed-off-by: Harald Dunkel <harri@afaics.de>
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
  • Loading branch information
harridu authored and hallyn committed Jul 28, 2017
1 parent f1401c0 commit 6273aef
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion templates/lxc-altlinux.in
Expand Up @@ -221,7 +221,7 @@ copy_altlinux()
#cp -a $cache/rootfs-$arch $rootfs_path || return 1
# i prefer rsync (no reason really)
mkdir -p $rootfs_path
rsync -Ha $cache/rootfs/ $rootfs_path/
rsync -SHaAX $cache/rootfs/ $rootfs_path/
return 0
}

Expand Down
2 changes: 1 addition & 1 deletion templates/lxc-centos.in
Expand Up @@ -533,7 +533,7 @@ copy_centos()
#cp -a $cache/rootfs-$arch $rootfs_path || return 1
# i prefer rsync (no reason really)
mkdir -p $rootfs_path
rsync -a $cache/rootfs/ $rootfs_path/
rsync -SHaAX $cache/rootfs/ $rootfs_path/
echo
return 0
}
Expand Down
2 changes: 1 addition & 1 deletion templates/lxc-debian.in
Expand Up @@ -433,7 +433,7 @@ copy_debian()
btrfs subvolume snapshot "$cache/rootfs-$release-$arch" "$realrootfs" || return 1
[ "$rootfs" = "$realrootfs" ] || mount --bind "$realrootfs" "$rootfs" || return 1
else
rsync -Ha "$cache/rootfs-$release-$arch"/ "$rootfs"/ || return 1
rsync -SHaAX "$cache/rootfs-$release-$arch"/ $rootfs/ || return 1
fi
return 0
}
Expand Down
2 changes: 1 addition & 1 deletion templates/lxc-fedora-legacy.in
Expand Up @@ -1015,7 +1015,7 @@ copy_fedora()
#cp -a $cache/rootfs-$basearch $rootfs_path || return 1
# i prefer rsync (no reason really)
mkdir -p $rootfs_path
rsync -Ha $cache/rootfs/ $rootfs_path/
rsync -SHaAX $cache/rootfs/ $rootfs_path/
echo
return 0
}
Expand Down
2 changes: 1 addition & 1 deletion templates/lxc-fedora.in
Expand Up @@ -520,7 +520,7 @@ copy_fedora()
echo -n "Copying ${cache} to ${rootfs} ... "

mkdir -p "${rootfs}" &&
rsync --archive --hard-links --sparse "${cache}/" "${rootfs}/" &&
rsync --archive --hard-links --sparse --acls --xattrs "${cache}/" "${rootfs}/" &&
echo || return 1

return 0
Expand Down
2 changes: 1 addition & 1 deletion templates/lxc-openmandriva.in
Expand Up @@ -155,7 +155,7 @@ copy_openmandriva()

echo -n "Copying rootfs to $rootfs_path ..."
mkdir -p $rootfs_path
rsync -Ha $cache/rootfs/ $rootfs_path/
rsync -SHaAX $cache/rootfs/ $rootfs_path/
return 0
}

Expand Down
2 changes: 1 addition & 1 deletion templates/lxc-opensuse.in
Expand Up @@ -251,7 +251,7 @@ copy_opensuse()
# make a local copy of the mini opensuse
echo "Copying rootfs to $rootfs ..."
mkdir -p $rootfs
rsync -Ha $cache/rootfs-$arch/ $rootfs/ || return 1
rsync -SHaAX $cache/rootfs-$arch/ $rootfs/ || return 1
return 0
}

Expand Down
2 changes: 1 addition & 1 deletion templates/lxc-ubuntu.in
Expand Up @@ -439,7 +439,7 @@ copy_ubuntu()
btrfs subvolume snapshot $cache/rootfs-$arch $realrootfs || return 1
[ "$rootfs" = "$realrootfs" ] || mount --bind $realrootfs $rootfs || return 1
else
rsync -Ha $cache/rootfs-$arch/ $rootfs/ || return 1
rsync -SHaAX $cache/rootfs-$arch/ $rootfs/ || return 1
fi
return 0
}
Expand Down

0 comments on commit 6273aef

Please sign in to comment.