Take a large piece of foil and fold it in half. Scatter the onions in the middle and pull up the sides of the foil to create a shallow 'dish'. Mix together the beer, sugar and mustard, then pour over the onions. Add the butter and thyme and season with salt and pepper. Pinch together the edges of the foil to seal the parcel, ensuring you don't leave any gaps. This will allow the onions to steam and barbecue at the same time.
Place carefully on the barbecue. Leave to cook for 25-30 minutes until the onions are meltingly soft and most of the beer has reduced to a syrupy consistency. During the cooking time, carefully open the foil a few times and stir the onions. If there's too much liquid in the foil when the onions are almost cooked, open up the top of the foil and cook for a further 5 minutes to allow the liquid to evaporate.
Place the sausages on a medium-hot barbecue and cook for 8-10 minutes, turning every so often. Check they're cooked through before serving. Put the cooked sausages in the rolls or French bread and dollop the onions on the top.