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 - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-19-2017, 09:50 PM   #1
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
What happens to /etc/rcS.d in the world of systemd?


Short version of Question:

What does systemd do with scripts in /etc/init.d/rcS?

Loooong version of this question:

So I'm trying to understand how the /var/tmp is created on openembedded.

I have managed to follow things this far....

/var is a directory on /

/var/tmp is a shambolic link to /var/volatile/tmp

/var/volatile is a tmpfs mount point created by

/run/systemd/generator/var-volatile.mount

...before the local-fs.target.


That generator was generated by systemd-fstab-generator which generates systemd .mounts from the /etc/fstab (which has the comment... # stock fstab - you probably want to override this with a machine specific one)

/lib/systemd/system/systemd-tmpfiles-setup.service is run after local-fs.target systemd-sysusers.service and before sysinit.target shutdown.target and runs...

/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev

This scans

/etc/tmpfiles.d/*.conf
/run/tmpfiles.d/*.conf
/usr/lib/tmpfiles.d/*.conf

for config files.

The file
/etc/tmpfiles.d/00-create-volatile.conf
creates the directory /var/volatile/tmp


The file
/usr/lib/tmpfiles.d/tmp.conf

has
q /var/tmp 1777 root root 30d
which means create a directory /var/tmp if it doesn't exist


When the generators are run, the systemd-sysv-generator is run, but it ignores
/etc/rcS.d/S37populate-volatile.sh
as there exists
/etc/systemd/system/populate-volatile.service
which is just a shambolic link to /dev/null

I can verify this using the debug trick mentioned at the bottom of the systemd-generators man page.

This means sysv generator does not generate a .service for /etc/rcS.d/S37populate-volatile.sh, and as it is null, nothing happens.

If populate-volatile.sh would be run, it would use the definitions in
/etc/default/volatiles/00_core

To create a shambolic link from /var/tmp to /var/volatile/tmp (which is what I see)

So it would seem that somehow something is running
/etc/rcS.d/S37populate-volatile.sh
and I don't know why or what.
 
Old 04-19-2017, 10:23 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Original Poster
Rep: Reputation: 87
Ok, I have found (part) of my answer. OpenEmbedded patches the systemd-sysv-generator to scan rcS.d (which is why reading the systemd source code was confusing me.

http://cgit.openembedded.org/openemb...9567d15243a74d
 
Old 04-19-2017, 10:34 PM   #3
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Original Poster
Rep: Reputation: 87
Angry

Ok. Found my answer completely now.....

And it's horrible.

Both the OpenEmbedded dbus recipe and the glibc recipe explicitly invoke

/init.d/populate-volatile.sh update

as a post install step.

Sigh.
 
  


Reply

Tags
rcs, 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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: systemd 230 Launches with DNSSEC Enabled by Default in systemd-resolved LXer Syndicated Linux News 0 05-22-2016 11:41 AM
Can't access full journalctl from script via systemd service even though user is in systemd-journal group iwtbf Linux - Newbie 0 02-19-2016 02:44 PM
LXer: Is systemd as bad as boycott systemd is trying to make it? LXer Syndicated Linux News 0 09-03-2014 05:50 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM
what is RCS tommytomato Linux - General 3 03-21-2010 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:13 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