On Fri, Jun 20, 2014 at 4:06 AM, <cov...@ccs.covici.com> wrote: > Hi. I want to turn numlock automatically, but I am using systemd and I > am having troubles doing this. At someones suggestion in a previous > message (I think Canek's) I created > /etc/systemd/system/getty@service.d/numlock.conf with the following > contents > > [Service] > ExecStartPost=/usr/bin/setleds -D -num </dev/%I > > > However, setleds dies with the following error: > Jun 19 14:24:55 ccs.covici.com setleds[4878]: KDGKBLED: Inappropriate > ioctl for device > Jun 19 14:24:55 ccs.covici.com setleds[4878]: Error reading current > flags setting. Maybe you are not on the console? > > I tried to fool with chvt to make the console current, but no joy there. > > Any assistance would be appreciated.
Could you post the exact invocation for setleds? It should be on the logs. I think the invocation for setleds shuld be: /usr/bin/setleds -D +num < /dev/%i The difference between %I (capital "i") and %i is only that %i escapes special symbols, but since it's only the string tty[1-N], I don't think it matters much. The exact invocation of setleds matters, so we can see if the template unit is generating the correct one. Regards. -- Canek Peláez Valdés Profesor de asignatura, Facultad de Ciencias Universidad Nacional Autónoma de México