You could also pass the father's name to boys and the mother's name to girls. Or all children get the same combined name based on the father's father's name and the mother's mother's name. So both matrilineal and patrilineal lines would be propagated.