[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting a serial console to work on Jessie



Stephen Powell <zlinuxman@wowway.com> wrote:

> Well, Sven, that's a nice idea, but I can't get it to work for me in this
> situation.  I issued

>    systemctl edit serial-getty@ttyS0.service

> and placed the following two lines into the file:

>    [Service]
>    ExecStart=-/sbin/agetty -8 --noclear %I 38400 ibm3151

> But when I restart the service, I get the following error:

> systemd[1]: serial-getty@ttyS0.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.

> I want to override "ExecStart", not add a new one.  What am I doing wrong?

You have to first clear the old ExecStart and then set a new one:
https://wiki.archlinux.org/index.php/Systemd#Drop-in_snippets

,----
| As another example, in order to replace the ExecStart directive for a unit
| that is not of type oneshot, create the following file:
| ,----
| | /etc/systemd/system/unit.d/customexec.conf
| | [Service]
| | ExecStart=
| | ExecStart=new command
| `----
`----

Yes, this is a bit counterintuitive.

So, in your case, the config file should look like this:

,----
| [Service]
| ExecStart=
| ExecStart=-/sbin/agetty -8 --noclear %I 38400 ibm3151
`----

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Reply to: