Unverified Commit 3378303a by Harald Dunkel Committed by Stéphane Graber

Use "rsync -SHaAX" to copy the cached rootfs into place

(updated by Serge to also handle hte new lxc-fedora{-legacy{.in templates) Signed-off-by: 's avatarHarald Dunkel <harri@afaics.de> Signed-off-by: 's avatarSerge Hallyn <serge@hallyn.com> Acked-by: 's avatarSerge Hallyn <serge@hallyn.com>
parent 63539ebf
...@@ -212,7 +212,7 @@ copy_altlinux() ...@@ -212,7 +212,7 @@ copy_altlinux()
#cp -a $cache/rootfs-$arch $rootfs_path || return 1 #cp -a $cache/rootfs-$arch $rootfs_path || return 1
# i prefer rsync (no reason really) # i prefer rsync (no reason really)
mkdir -p $rootfs_path mkdir -p $rootfs_path
rsync -Ha $cache/rootfs/ $rootfs_path/ rsync -SHaAX $cache/rootfs/ $rootfs_path/
return 0 return 0
} }
......
...@@ -533,7 +533,7 @@ copy_centos() ...@@ -533,7 +533,7 @@ copy_centos()
#cp -a $cache/rootfs-$arch $rootfs_path || return 1 #cp -a $cache/rootfs-$arch $rootfs_path || return 1
# i prefer rsync (no reason really) # i prefer rsync (no reason really)
mkdir -p $rootfs_path mkdir -p $rootfs_path
rsync -a $cache/rootfs/ $rootfs_path/ rsync -SHaAX $cache/rootfs/ $rootfs_path/
echo echo
return 0 return 0
} }
......
...@@ -335,7 +335,7 @@ copy_debian() ...@@ -335,7 +335,7 @@ copy_debian()
# make a local copy of the minidebian # make a local copy of the minidebian
echo -n "Copying rootfs to $rootfs..." echo -n "Copying rootfs to $rootfs..."
mkdir -p "$rootfs" mkdir -p "$rootfs"
rsync -Ha "$cache/rootfs-$release-$arch"/ "$rootfs"/ || return 1 rsync -SHaAX "$cache/rootfs-$release-$arch"/ "$rootfs"/ || return 1
return 0 return 0
} }
......
...@@ -1015,7 +1015,7 @@ copy_fedora() ...@@ -1015,7 +1015,7 @@ copy_fedora()
#cp -a $cache/rootfs-$basearch $rootfs_path || return 1 #cp -a $cache/rootfs-$basearch $rootfs_path || return 1
# i prefer rsync (no reason really) # i prefer rsync (no reason really)
mkdir -p $rootfs_path mkdir -p $rootfs_path
rsync -Ha $cache/rootfs/ $rootfs_path/ rsync -SHaAX $cache/rootfs/ $rootfs_path/
echo echo
return 0 return 0
} }
......
...@@ -155,7 +155,7 @@ copy_openmandriva() ...@@ -155,7 +155,7 @@ copy_openmandriva()
echo -n "Copying rootfs to $rootfs_path ..." echo -n "Copying rootfs to $rootfs_path ..."
mkdir -p $rootfs_path mkdir -p $rootfs_path
rsync -Ha $cache/rootfs/ $rootfs_path/ rsync -SHaAX $cache/rootfs/ $rootfs_path/
return 0 return 0
} }
......
...@@ -251,7 +251,7 @@ copy_opensuse() ...@@ -251,7 +251,7 @@ copy_opensuse()
# make a local copy of the mini opensuse # make a local copy of the mini opensuse
echo "Copying rootfs to $rootfs ..." echo "Copying rootfs to $rootfs ..."
mkdir -p $rootfs mkdir -p $rootfs
rsync -Ha $cache/rootfs-$arch/ $rootfs/ || return 1 rsync -SHaAX $cache/rootfs-$arch/ $rootfs/ || return 1
return 0 return 0
} }
......
...@@ -439,7 +439,7 @@ copy_ubuntu() ...@@ -439,7 +439,7 @@ copy_ubuntu()
btrfs subvolume snapshot $cache/rootfs-$arch $realrootfs || return 1 btrfs subvolume snapshot $cache/rootfs-$arch $realrootfs || return 1
[ "$rootfs" = "$realrootfs" ] || mount --bind $realrootfs $rootfs || return 1 [ "$rootfs" = "$realrootfs" ] || mount --bind $realrootfs $rootfs || return 1
else else
rsync -Ha $cache/rootfs-$arch/ $rootfs/ || return 1 rsync -SHaAX $cache/rootfs-$arch/ $rootfs/ || return 1
fi fi
return 0 return 0
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment