+ # build the systemvserver from the one it was originally cloned from
+ TYPE=$(cat $systemvserver)
+ REF="$__DEFAULT_VSERVERDIR/.vref/$TYPE"
+ "$_VCLONE" "$REF"/ "$TMP"/
+ RETVAL=$?
+
+ # merge the stub with the reference to get the system vserver
+ if [ $RETVAL -eq 0 ] ; then
+ (cd "$__DEFAULT_VSERVERDIR/.vstub/$NAME"/ && find . | cpio -m -d -u -p "$TMP"/)
+ RETVAL=$?
+ fi
+
+ # Clean RPM state
+ rm -f "$TMP/var/lib/rpm/__db"*
+
+ # Move it to its permanent location when complete
+ if [ $RETVAL -eq 0 ] ; then
+ mv "$TMP" "$__DEFAULT_VSERVERDIR/.vref/$NAME"
+ success >&3 2>&4
+ else
+ failure >&3 2>&4
+ fi
+ echo >&3 2>&4
+ fi
+done
+
+echo -n $"Updating VServer reference images: " >&3 2>&4
+
+VROOTS="$__DEFAULT_VSERVERDIR/.vref/* $__DEFAULT_VSERVERDIR/.vcache/* $__DEFAULT_VSERVERDIR/${PLC_SLICE_PREFIX}_*"