Scottish naming system
The Irish system was similar. It wasn't always used and sometimes a second or middle name was used instead, but if it was, it went like this:
BOYS
First son named after father's father
Second son named after mother's father
Third son named after father
Fourth son named after father's oldest brother
Fifth son named after second oldest brother or mother's eldest brother
GIRLS
First daughter named after mother's mother
Second daughter named after father's mother
Third daughter named after mother
Fourth daughter named after mother's oldest sister
Fifth daughter named after second oldest sister or father's oldest sister