No, school is not mostly an agent of socialization for the government. While school certainly is a tool of socialization, it is also a place of education and learning. On top of that, to think that the socialization in school is purely to the benefit of the government is asinine as many kids and teens are introduced to counter-cultures while in school.
The argument certainly has merit- in the United States, for example, children are taught the pledge of allegiance and the story of the pilgrims. Some history taught in the classroom is whitewashed in the United States' favor. The reality, however, is that completing school does have a measurable effect on the achievement of children in their adult future, and that lends evidence towards there being something more complex at play than simple government propagandizing.