1 |
2014-06-20 11:26 GMT-06:00 <covici@××××××××××.com>: |
2 |
|
3 |
> I tried your idea of a shell script like this |
4 |
> [Service] |
5 |
> ExecStartPost=/bin/bash -c "setleds -D -num </dev/%I" |
6 |
I tried your line on my system, and rebooted, and didn't see any problem. |
7 |
|
8 |
I have: |
9 |
|
10 |
/etc/systemd/system/getty\@.service.d/numlock.conf: |
11 |
[Service] |
12 |
#ExecStartPost=-/bin/sh -c '/usr/bin/setleds -D -num </dev/%I' |
13 |
ExecStartPost=/bin/bash -c "/usr/bin/setleds -D -num </dev/%I" |
14 |
|
15 |
|
16 |
After reboot I logged in using tty1, here's the output of |
17 |
|
18 |
systemctl status -l getty@××××.service: |
19 |
----- |
20 |
● getty@××××.service - Getty on tty1 |
21 |
Loaded: loaded |
22 |
(/etc/systemd/system/getty.target.wants/../../../../usr/lib/systemd/system/getty@.service; |
23 |
enabled) |
24 |
Drop-In: /etc/systemd/system/getty@.service.d |
25 |
└─numlock.conf |
26 |
Active: active (running) since vie 2014-06-20 12:04:47 CST; 19min ago |
27 |
Docs: man:agetty(8) |
28 |
man:systemd-getty-generator(8) |
29 |
http://0pointer.de/blog/projects/serial-console.html |
30 |
|
31 |
----->This line: |
32 |
Process: 625 ExecStartPost=/bin/bash -c /usr/bin/setleds -D -num |
33 |
</dev/%I (code=exited, status=0/SUCCESS) |
34 |
|
35 |
|
36 |
Main PID: 624 (login) |
37 |
CGroup: /system.slice/system-getty.slice/getty@××××.service |
38 |
‣ 624 /bin/login -- |
39 |
|
40 |
jun 20 12:05:17 jdesk login[624]: pam_unix(login:session): session |
41 |
opened for user jc by LOGIN(uid=0) |
42 |
----- |
43 |
|
44 |
> But it did not work, it kept restarting and systemd eventually refused |
45 |
> to start. When I commented out the line, it started OK. |
46 |
> |
47 |
|
48 |
Post the actual output you get from systemd when is trying to start a |
49 |
getty@ service, to see what's going on in your machine. |
50 |
|
51 |
> |
52 |
> -- |
53 |
> Your life is like a penny. You're going to lose it. The question is: |
54 |
> How do |
55 |
> you spend it? |
56 |
> |
57 |
> John Covici |
58 |
> covici@××××××××××.com |
59 |
> |