LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-02-2013, 02:25 AM   #1
husten
Member
 
Registered: Apr 2006
Distribution: sabayon, opensuse
Posts: 56

Rep: Reputation: 16
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!
 
Old 06-02-2013, 01:24 PM   #2
edorig
Member
 
Registered: Apr 2013
Location: France
Distribution: Slackware; Ubuntu
Posts: 134

Rep: Reputation: Disabled
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 ?
 
Old 06-02-2013, 03:10 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by husten View Post
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)
 
Old 06-03-2013, 08:08 AM   #4
husten
Member
 
Registered: Apr 2006
Distribution: sabayon, opensuse
Posts: 56

Original Poster
Rep: Reputation: 16
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.
 
Old 06-04-2013, 06:35 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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?
 
1 members found this post helpful.
Old 06-04-2013, 07:33 PM   #6
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by edorig View Post
...
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
 
2 members found this post helpful.
Old 06-06-2013, 07:51 AM   #7
husten
Member
 
Registered: Apr 2006
Distribution: sabayon, opensuse
Posts: 56

Original Poster
Rep: Reputation: 16
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?
 
Old 06-06-2013, 03:54 PM   #8
vorbote
Member
 
Registered: Aug 2009
Location: 2,625 m of paranoia above sea level
Distribution: Arch Linux, Debian GNU/Linux, Fedora, Void Linux, FreeBSD, OpenBSD and Win10
Posts: 77

Rep: Reputation: Disabled
Quote:
Originally Posted by husten View Post
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).
 
Old 07-27-2013, 06:39 PM   #9
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
Even better... Become an Arch convert
 
  


Reply

Tags
opensuse, runlevel, systemd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Things that systemd gets right LXer Syndicated Linux News 0 01-24-2013 05:00 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM
LXer: How to do simple things the Sabayon way LXer Syndicated Linux News 0 06-06-2011 11:50 PM
Simple things. jared515 Linux - Newbie 3 03-19-2006 12:20 PM
retard can't figure out simple things Karnak Linux - Hardware 13 10-05-2002 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration