# Set the attribute to unlink so vclone does the right thing wrt to
# conserving space by linking and not copying unified files.
-find "$__DEFAULT_VSERVERDIR/.vref"/* -type f -print0 | xargs -0 setattr --iunlink
+
+if [ -f /proc/virtual/info ] ; then
+ x=$[ 16#`awk '/^VCIKernel:/ { print $2 }' /proc/virtual/info` ];
+ y=$[ (x >> 9) & 1]
+ if test "$y" = 1 ; then
+ # COW support
+ find "$__DEFAULT_VSERVERDIR/.vref"/* -type f -print0 | xargs -0 setattr --iunlink
+ else
+ # no COW;
+ find "$__DEFAULT_VSERVERDIR/.vref"/* -type f -print0 | xargs -0 setattr --~iunlink
+ fi
+fi
+
# Build reference images for system slices
# xxx if several instances of systemslices get installed, only one gets instanciated