In Castaneda's writings, discipline is a key aspect of the path of the warrior. For Castaneda, the word has special connotations that go somewhat beyond the dictionary meaning of the term.
Discipline is required for facing the unknown. Discipline cannot be defined as strict adherence to outward forms or practices only. It has more to do with constancy of internal purpose, fusing a singular I, as Gurdjieffians would say. Because this process is internal and somewhat different for each, a strict external definition of discipline is not possible.
Discipline relates to freedom through the fact that freedom or free will is meaningless if the person does not have internal consistency. Freedom in the material sense means little more than the possibility to follow external stimuli, in other words to indulge in whatever mechanical behaviors happen to attract the little I's at whichever time. Spiritual freedom, having to do with a truly unconditioned choice, free from coercion, personal interest or considering, is meaningful only when the person has a certain amount of discipline, id est, internal consistency.