LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   simple things on systemd (http://www.linuxquestions.org/questions/linux-desktop-74/simple-things-on-systemd-4175464430/)

husten 06-02-2013 03:25 AM

simple things on systemd
 
Just when I had sort of learned setting runlevels - here comes dumb systemd pushed down my throat by opensuse.

Mediatomb starts before ifplugd brings up the net - FAIL! AAARG!

Yes I have found the problem in the journal file, but no idea how can I fix this? Anyone out there that knows the workflow/commands? Most of the literature I googled assumes that you already are an systemd expert ('just use before='! duh!). It seems to vary between distro's too, some stuff is in /etc/systemd some in /lib/systemd what a bloody mess....

Please help!

edorig 06-02-2013 02:24 PM

I believe you cannot fix that since systemd is designed for parallelizing your system startup. So you can't
have certainty that a daemon will start after another. Systemd expects that all messages to a daemon can
be queued and that the daemon will process them after it starts.

My solution would be to install Slackware that is still using System V Init, or Gentoo (uses OpenRC) or Debian
(uses Upstart) or one of the BSDs. But of course, what works for me (Slackware) may not be practical for you. Is there some software provided by OpenSUSE that you absolutely need ? Also, do you have a maintenance contract with
SUSE ? If so, cannot you let them fix the problem they have created ?

unSpawn 06-02-2013 04:10 PM

Quote:

Originally Posted by husten (Post 4963896)
Mediatomb starts before ifplugd brings up the net (..) how can I fix this?

Find the mediatomb.service file, in the "unit" section modify / add dependencies to the "after" line so it looks something like
Code:

After=network.target ifplugd.target
(http://0pointer.de/blog/projects/sys...-admins-3.html)

husten 06-03-2013 09:08 AM

Thanks unSpawn way forward, but...

funny enough as this is a hybrid thing in opensuse, there is no service file for mediatomb:

Quote:

# systemctl enable mediatomb.service
mediatomb.service is not a native service, redirecting to /sbin/chkconfig.
(and probably no ifplugd service file to refer to either, in runlevels i have "network" though it is named "ifplugd"in the journalctl:

Quote:

Jun 03 19:15:09 ..systemd[1]: Failed to start LSB: MediaTomb daemon.
Jun 03 19:15:09 .. systemd[1]: Unit mediatomb.service entered failed state
Jun 03 19:15:09 .. kernel: tg3 0000:05:00.0 eth0: Link is up at 1000 Mbps, full duplex
Jun 03 19:15:09 .. kernel: tg3 0000:05:00.0 eth0: Flow control is on for TX and on for RX
Jun 03 19:15:09 .. kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jun 03 19:15:10 .. ifplugd(eth0)[912]: Link beat detected.
Jun 03 19:15:10 .. avahi-daemon[511]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::224:e8ff:fe2d:b603.
Jun 03 19:15:10 .. avahi-daemon[511]: New relevant interface eth0.IPv6 for mDNS.
Jun 03 19:15:10 .. avahi-daemon[511]: Registering new address record for fe80::224:e8ff:fe2d:b603 on eth0.*.
Jun 03 19:15:11 .. ifplugd(eth0)[912]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
Unfortunately the blog entry you sent (isn't this guy the cause of our sleepless hours?) does not address any of these. He assumes you just know already....
Thanks edorig, but I am an amateur and not smart enough for Slackware, maybe Sabayon which I am running on my laptop - where knwoing a handfull of equo commands get you a very long way.

Please, any more details on how to create and presumably register this 2 service file(s) greatly appreciated.

TobiSGD 06-04-2013 07:35 PM

systemd parses the init scripts of services that don't have a unit file and searches in the LSB header for dependency information. Have you checked if the dependency information in the Mediatomb script is correct?

SaintDanBert 06-04-2013 08:33 PM

Quote:

Originally Posted by edorig (Post 4964132)
...
My solution would be to install Slackware that is still using System V Init, or Gentoo (uses OpenRC) or Debian
(uses Upstart) or one of the BSDs. But of course, what works for me (Slackware) may not be practical for you.
...

My boxers bunch every time I read a "solution" than includes "install some other distro. I'm thrilled that the linux ecosystem includes so many diverse package collections and end-user experiences. Like text editors, browsers, and such, to each their own.

Folks choose a distro for some reason. That reason likely has very little to do with the geeky twiddle bits. I side with the Original Poster (husten) that a change like System-V Init vs. 'systemd' is a very big deal. Couple that with the total lack of end-user documentation for 'systemd' or its cousin 'upstart' and the poor end user can be completely unable to get anything done or to proceed without wasting a lot of time.

Just one opinion,
~~~ 0;-Dan

husten 06-06-2013 08:51 AM

Everything in the old init.d system looks right, mediatomb starts after network (Highest S number in runlevel 5). It is only then lost in translation on the fly to systemd. So what can I do? How do I create a service file for mediatomb and for network from scratch?

vorbote 06-06-2013 04:54 PM

Quote:

Originally Posted by husten (Post 4966555)
Everything in the old init.d system looks right, mediatomb starts after network (Highest S number in runlevel 5). It is only then lost in translation on the fly to systemd. So what can I do? How do I create a service file for mediatomb and for network from scratch?

Take the easy route: Dig in Arch's repositories. There is a mediatomb "recipe" in the AUR, grab the tar file with the recipe and use the service file. On ifplugd, it is part of the distribution. You can grab it from the official git repositories. (I'll leave that as an exercise, everything is one or two clicks and one or two searches from the official Arch Linux website).

jv2112 07-27-2013 07:39 PM

Even better... Become an Arch convert :cool:


All times are GMT -5. The time now is 03:53 PM.