On Tue, Oct 1, 2019 at 3:36 PM yoda woya <yodaw...@gmail.com> wrote:

>
>
> On Tue, Oct 1, 2019 at 1:50 PM yoda woya <yodaw...@gmail.com> wrote:
>
>>
>>
>> On Tue, Oct 1, 2019 at 1:12 PM Greg Wooledge <wool...@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:
>>>
>>> After=remote-fs.target
>>>
>>> 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
>>
>
>
> 🤕😬
>
> Any other suggestions??
>

When I disable/enable the service I get

systemctl enable  udhcpd.service
Synchronizing state of udhcpd.service with SysV service script with
/lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable udhcpd
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.

Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

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)

Reply via email to