Hello,
Thanks for all the clarification. I now find myself in need of doing this
again on another server running Jessie, and I just want to make sure I'm
clear on what the best procedure is. As I understand it, I should
copy /lib/systemd/system/[email protected] to
/etc/systemd/system/[email protected], then
edit [email protected] to include the following:
[Service]
ExecStart=
ExecStart=-/sbin/agetty -8 --noclear %I 9600 vt100
...
Is that correct?
Thanks!
Dave
On Sun, Sep 6, 2015 at 9:52 PM, Stephen Powell <[email protected]> wrote:
> On Sun, 06 Sep 2015 16:06:35 -0400 (EDT), Michael Biebl wrote:
> > Am 06.09.2015 um 21:04 schrieb Stephen Powell:
> >> ...
> >> [Service]
> >> ExecStart=-/sbin/agetty -8 --noclear %I 38400 ibm3151
> >>
> >> But when I restart the service, I get the following error:
> >>
> >> systemd[1]: [email protected]: 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?
> >
> > By default, systemd will simply merge all drop-ins.
> > In your case, ExecStart is a setting which can not be specified more
> > then once. So you need to "clear" it first. The following should do the
> > trick:
> >
> > [Service]
> > ExecStart=
> > ExecStart=-/sbin/agetty -8 --noclear %I 38400 ibm3151
> >
> >
> > The "ExecStart=" resets the existing setting.
> >
> > ...
>
> That works. This is definitely a better solution than copying
> [email protected] from /lib/systemd/system to /etc/systemd/system
> and then editing the copy in /etc/systemd/system to change the ExecStart
> value. It is better for two reasons:
>
> (1) When systemd is serviced, I don't need to recopy and reedit the file
> in order to keep my changes synced up with changes to the file made by
> service to systemd.
>
> (2) It allows two different serial ports to have different ExecStart values
> for two different terminal types, for example. Using my original method,
> both serial ports would be locked into the same terminal type.
>
> I shall change my documentation accordingly. Thanks, Michael and Sven
> for your suggestions and help.
>
> Regards,
>
> --
> .''`. Stephen Powell <[email protected]>
> : :' :
> `. `'`
> `-
>
>
--
Dave Parker
Systems Administrator
Utica College
Integrated Information Technology Services
(315) 792-3229
Registered Linux User #408177