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

Re: where to look in logs

On Tue, Oct 1, 2019 at 1:12 PM Greg Wooledge <wooledg@eeg.ccf.org> wrote:
On Tue, Oct 01, 2019 at 01:02:03PM -0400, yoda woya wrote:
> # /run/systemd/generator.late/udhcpd.service
> # Automatically generated by systemd-sysv-generator

Yikes.  So, this isn't even a native systemd unit.  It's some kind of
sysv-rc init script, and systemd is converting it to a systemd unit
automatically, and some subtle stuff is being lost in translation.

> [Unit]
> Documentation=man:systemd-sysv-generator(8)
> SourcePath=/etc/init.d/udhcpd
> Description=LSB: Start busybox udhcpd at boot time
> Before=multi-user.target
> Before=multi-user.target
> Before=multi-user.target
> Before=graphical.target
> After=remote-fs.target
> [Service]
> Type=forking
> Restart=no
> TimeoutSec=5min
> IgnoreSIGPIPE=no
> KillMode=process
> GuessMainPID=no
> RemainAfterExit=yes
> SuccessExitStatus=5 6
> ExecStart=/etc/init.d/udhcpd start
> ExecStop=/etc/init.d/udhcpd stop

If this actually *works* when you start it manually, then here's what
I would do.

Step 1:

systemctl cat udhcpd.service > /etc/systemd/system/udhcpd.service

Step 2:

Open /etc/systemd/system/udhcpd.service in your favorite text editor,
and change this line:


to this:

After=remote-fs.target network-online.target

Maybe also get rid of the comments at the top that say it's autogenerated,
if you like.  Then save it.

Step 3:

systemctl daemon-reload

That should delay udhcpd's start until after the network interfaces are
up, assuming you have that working (correct the spelling of "network"
as Gene pointed out, and get rid of that "broadcast" line).

Follow the instruction but it do not ran at boot :-(

systemctl status udhcpd.service
● udhcpd.service - LSB: Start busybox udhcpd at boot time
   Loaded: loaded (/etc/init.d/udhcpd; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

journalctl |grep udhcpd returns nothing

Reply to: