public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jc García" <jyo.garcia@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] trying to turn numlock automatically in my ttys under systemd
Date: Fri, 20 Jun 2014 12:43:53 -0600	[thread overview]
Message-ID: <CAGQH77f6NirVykocwNGCuTfn4HuPVHunKw=1EdRhrtEhiNCwxQ@mail.gmail.com> (raw)
In-Reply-To: <10309.1403285176@ccs.covici.com>

2014-06-20 11:26 GMT-06:00  <covici@ccs.covici.com>:

> I tried your idea of a shell script like this
> [Service]
> ExecStartPost=/bin/bash -c "setleds -D -num </dev/%I"
I tried your line on my system, and rebooted, and didn't see any problem.

I have:

/etc/systemd/system/getty\@.service.d/numlock.conf:
[Service]
#ExecStartPost=-/bin/sh -c '/usr/bin/setleds -D -num </dev/%I'
ExecStartPost=/bin/bash -c "/usr/bin/setleds -D -num </dev/%I"


After reboot I logged in using tty1, here's the output of

systemctl status -l getty@tty1.service:
-----
● getty@tty1.service - Getty on tty1
   Loaded: loaded
(/etc/systemd/system/getty.target.wants/../../../../usr/lib/systemd/system/getty@.service;
enabled)
  Drop-In: /etc/systemd/system/getty@.service.d
           └─numlock.conf
   Active: active (running) since vie 2014-06-20 12:04:47 CST; 19min ago
     Docs: man:agetty(8)
           man:systemd-getty-generator(8)
           http://0pointer.de/blog/projects/serial-console.html

----->This line:
  Process: 625 ExecStartPost=/bin/bash -c /usr/bin/setleds -D -num
</dev/%I (code=exited, status=0/SUCCESS)


 Main PID: 624 (login)
   CGroup: /system.slice/system-getty.slice/getty@tty1.service
           ‣ 624 /bin/login --

jun 20 12:05:17 jdesk login[624]: pam_unix(login:session): session
opened for user jc by LOGIN(uid=0)
-----

> But it did not work, it kept restarting and systemd eventually refused
> to start.  When I commented out the line, it started OK.
>

Post the actual output you get from systemd when is trying to start a
getty@ service, to see what's going on in your machine.

>
> --
> Your life is like a penny.  You're going to lose it.  The question is:
> How do
> you spend it?
>
>          John Covici
>          covici@ccs.covici.com
>


  reply	other threads:[~2014-06-20 18:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20  9:06 [gentoo-user] trying to turn numlock automatically in my ttys under systemd covici
2014-06-20 15:06 ` Canek Peláez Valdés
2014-06-20 16:40   ` Jc García
2014-06-20 17:08     ` Canek Peláez Valdés
2014-06-20 16:53   ` covici
2014-06-20 17:01     ` Jc García
2014-06-20 17:26       ` covici
2014-06-20 18:43         ` Jc García [this message]
2014-06-20 19:46           ` covici
2014-06-20 19:52             ` Michael Cook
2014-06-20 20:04               ` Jc García

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGQH77f6NirVykocwNGCuTfn4HuPVHunKw=1EdRhrtEhiNCwxQ@mail.gmail.com' \
    --to=jyo.garcia@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox