during most o the nineteenth and early twentieth centuries, appointments to tehe civil service were based primarily on what