systemd is systemv times one hundred!
See all
Members (3,069)
Harald Hoyer's profile photo
Michal Sekletár's profile photo
Lennart Poettering's profile photo
systemd's profile photo
Vincent Van der Kussen's profile photo
Harrison Teng's profile photo
Kyungmin Park's profile photo
Clayton Casciato's profile photo
Raphael Ludwig's profile photo
Mauro Toffanin's profile photo
John Kwan's profile photo
John Salvatore Fontanelli's profile photo
Burak Sezer's profile photo
Tony Nie's profile photo
Bård Aase's profile photo
Chester Moy's profile photo
Gabriel G's profile photo
Николай Кирчев's profile photo
Anton “tony” Bangratz's profile photo
Jeff Hatfield (nomasteryoda)'s profile photo
Alexander Tanyukevich's profile photo
Joshua Barretto's profile photo
Dhaval Giani's profile photo
Franz-Peter Leitgeb's profile photo

Stream

Join this community to post or comment
 
Hi all!
Is there a way with systemd to exec a command on another tty without root privileges?
Eg: i'd like to start htop on a second tty from may be a desktop file from my kde desktop.
Is this possible?

Thanks everyone!
1
Federico Di Pierro's profile photoTetja Rediske's profile photo
3 comments
 
To start? sure, but you can specify which user gets logged in and which program is started.
Add a comment...
 
From my talk last night for the Reliability Engineering Meetup hosted at Facebook:
9
10
Christophe Roux's profile photoBernd Zeimetz's profile photo
Add a comment...
 
Hi there!

Will +systemd (I mean systemd-as-PID1) be related to http://www.bus1.org somehow? According to the documentation published up to now, this project will have its own PID1 binaries (org.bus1.init and org.bus1.rdinit).
Version 1. Index. Overview. org.bus1.bootstrap(7) · Git repositories. Services. org.bus1.activator(1) · org.bus1.administrator(1) · org.bus1.coredump(1) · org.bus1.devices(1) · org.bus1.init(1) · org.bus1.rdinit(1). Kernel Module ...
3
Jan Alexander Steffens (heftig)'s profile photo
 
The bus1 project is a sandbox for a couple of Red Hat engineers to experiment with and develop new technologies. AFAIK it's currently cooking a multicast messaging system (the kernel part) and an init system for IOT devices.

I would expect that successful designs will eventually find their way into systemd.
Add a comment...
 
Hi,
I have a test.path running and it's in waiting state, how can I configure it to kill itself after 5 seconds of waiting ? or execute some script after 5 seconds. Tried using JobTimeout=5s, JobTimeoutAction=/home/root/somescript.sh. it didn't work.
Any suggestions ?

Thanks in Advance.
1
Jeshwanth Kumar N K's profile photopete travis's profile photo
6 comments
 
I don't think a path unit is right for you, but a udev trigger might be. Take a look at ie http://unix.stackexchange.com/questions/28548/how-to-run-custom-scripts-upon-usb-device-plug-in .
Add a comment...

百合仙子

Discussion  - 
 
I have a service A¸ and another B requires A to run. B should be stopped when A is gone, so I add to B "Requires=A.service". But then when I restart A, B fails. Maybe I should instead reload A, but A is of Type=simple and I don't know what to do for "ExecReload", as the only way to "reload" the program is to restart it.

Is there options to achieve any of these without wrapper scripts?
1. requires but doesn't fail when dependencies restart
2. a reload action actually restarts the program
1
Dave Gaulke's profile photo百合仙子's profile photo
2 comments
 
+Dave Gaulke Today I tried to reproduce this issue, but it disappeared! It seems that systemd 229 has changed its behavior. Thank you anyway.
Add a comment...
 
Hi, I use Arch Linux, I would like to run some scripts when there is any USB device mounted. I can write a script and keep looking for the output of mounts command. But, I would like to know any other possibility through systemd we can achieve this.
Example:
1. systemd.path unit file for keep monitoring for particular path.
2. something to do with systemd.device or systemd.automounter ?
3. Or can I create a unit file which can executed by systemd whenever something is got mounted ?

Thanks 
1
Daniel Rowe's profile photoGary van der Merwe's profile photo
2 comments
 
systemd will not mount USB drives automatically by default.

If you usb drives are being automatically mounted, it is most likely being done by udisks. You can monitor this by running `udisksctl monitor`.

See http://udisks.freedesktop.org/docs/latest/
Add a comment...

Michael Heyns

Discussion  - 
 
I would like a file based filesystem to be mounted using a user .mount unit. But it fails with: mount: only root can do that

I am able to mount manually as the normal user.

Any advice?
1
Colin Guthrie's profile photoMichael Heyns's profile photo
5 comments
 
+Noah Friedman unfortunately no selinux available on this kernel.

+Colin Guthrie​ Thanks for the insight. Do you think it is worth opening an issue on github? Maybe I should consult the mailing list.
Add a comment...

Ani Banerjee

Discussion  - 
 
Hi,
Can anyone  help me with a networking issue please. I am assigning a dedicated interface to the container via "--network-interface=eth1". Now how do I set a static ip for the container? Do I need systemd-network configured? Cheers!
1
Add a comment...

Ahmed Kamal

Discussion  - 
 
Securing #centos 7 server with yum-cron (awesome) .. Sad there's no way to restart svcs/kernel when it makes sense. Any #systemd magic ? +Lennart Poettering ;)


1
Michael Chapman's profile photo
9 comments
 
I should add that the idea of automatically restarting services just because their libraries got updated is pretty bonkers anyway.

What happens if a very low-level library gets updated, like glibc? Should every service be restarted? If not, are you now going to have to maintain some kind of blacklist so that only "safe" libraries trigger a restart?

What about processes that aren't associated with services, like things in people's login sessions?

And finally, the sort of search that needs-restarting and similar tools do is pretty naive. They simply look around for processes that seem to have library files open that are no longer present in the filesystem (i.e. have been replaced with a newer version). But that really only works with load-time-linked shared object libraries -- it doesn't help software that dynamically loads and unloads libraries at runtime, or software written in scripting languages that don't keep their library files open all the time.

There's a reason why needs-restarting (and similarly the "tracker" plugin for DNF) simply report the list of processes that might need restarting and leave it up to the sysadmin to decide what to do.
Add a comment...

Jonathan Kang

Discussion  - 
 
Does sd_journal_next(journal) functions the same as sd_journal_next_skip(journal, 1)?

Thanks in advance.
1
Frederic Crozat's profile photoJonathan Kang's profile photo
2 comments
 
+Frederic Crozat Okay. Thanks for the help!
Add a comment...

百合仙子

Discussion  - 
 
Hi, can journalctl show logs in generating order instead of time order? I have a system without a battery and I need to read the latest generated logs.
1
Peter H.S.'s profile photo百合仙子's profile photo
4 comments
 
+Peter H.S. Thanks. It shows monotonic timestamps, but does not sort by them so I have to sort them myself.

And I find that on my notebook, the logs at the beginning have larger monotonic timestamps (without any other options) than at the end (-n). Has it wrapped?

PS: it's strange that there are more reboot marks in the journal of my clockless system than the times it has actually rebooted.
Add a comment...

About this community

A community for all things +systemd

Marko Subasic

Discussion  - 
 
I am trying to schedule a daily backup service using systemd, but with no success. I would like to do a full sync of my home directory from local SSD to local HDD during the poweroff sequence. The backup service gets started during the poweroff sequence (wanted by the powetoff.target), but the target drive gets unmounted prior to any writing, so the backup script fails. This happens most of the time, and on rare occasions, the backup service succeeds because it starts writing to HDD prior to unmounting. My question is: how can a service unit started during the poweroff sequence, prevent a mount from being unmounted during the execution of the unit? The unit file and a few more details on my setup can be found here: http://ubuntuforums.org/showthread.php?t=2317181

Any suggestions?
Thanks in Advance.
I am trying to do a backup of home directory from local SSD to local HDD on a desktop PC running Ubuntu 15.10. The idea is to perform a synchronization using rsyncrypto during the poweroff equence, because there are no file operations in home directory at that time, and I don't really care if the sync takes some time. So I created this systemd unit: Description=backup to internal HDD before shutdown Before=umount.target poweroff.target Aft...
2
Marko Subasic's profile photo
10 comments
 
+Michael Chapman Finally success! I am using ExecStop directive, as you suggested. Thu unit is started by user-1000.slice (when I log in), and it is stopped by the conflicting poweroff.target. Stopping of my unit is scheduled after stopping of local-fs.target. Full unit file with comments is here  http://ubuntuforums.org/showthread.php?t=2317181

Thanks for pointing me in the right direction. I am getting the results that I want, but please let me know if my approach is messy in any way.
Add a comment...

Steve Youngs

Discussion  - 
 
Lost colour from boot messages in v229

After updating to v229 (from v221) I'm no longer getting coloured '[ OK ]' in the boot messages. I know it still works because I do get it in the initrd portion of the boot (dracut). I also do get colour when something takes too long and has that little red horizontal scrolly asterix.

Does anyone know what might be going on? I've checked the git logs and scoured the net for clues, but so far I'm stumped. :-(
1
Add a comment...

Dirk Heinrichs

Discussion  - 
 
Hi,
1
Dirk Heinrichs's profile photoRay Strode's profile photo
12 comments
 
so doing a little reading, it seems AFS credentials are stored kernel side, and restricted to the "process authentication group" (~ session) they originate in. So systemd --user and AFS aren't a good fit for one another. glad you found an alternative way to deal with it.
Add a comment...

Patrick Schaaf

Discussion  - 
 
Quick question: is it okay, in principle, to call something like "systemctl try-restart otherunit" from within a unit's Start script? Especially when that unit is in an After= relationship to otherunit? And that otherunit is systemd-journald? :)

I've got a unit fiddling with journald config files and then doing such a thing; that seemed to work fine with the good old systemd 208 in our openSUSE 13.1 systems, but something is getting fishy with a newer systemd (but in a very peculiar place, so it might easily be something else - concretely my unit hangs during an autoyast autoinstallation attempt with openSUSE 42.1...)
1
1
百合仙子's profile photoPatrick Schaaf's profile photoBrian Fitzgerald's profile photo
6 comments
 
+Michael Biebl thank your for the --no-block hint. I now use that, no more issues so far.
Add a comment...

Dave Gaulke

Discussion  - 
 
Is it possible to have multiple services share a mount namespace? I have attempted this with using PrivateTmp=true and JoinsNamespaceOf. Even though the services do get a shared /tmp, they do not end up in the same mount namespace. Subsequent bind mounts in one service do not show up in the other services.
2
Add a comment...

Elias Probst

Discussion  - 
 
This looks really ugly how they're trying to solve those issues and I feel systemd offers better ways to deal with the situation. Can someone spare a few minutes and help them out with a proposal for a proper solution?
 
We’ve had reports that in Kolab 16, when the system restarts, the Manticore service may be started before the MongoDB service (has become functionally apt). This would render Manticore unavailable on every system restart. This article is about how we are…
3
Jóhann B. Guðmundsson's profile photoElias Probst's profile photo
2 comments
 
+Jóhann B. Guðmundsson Alright. Thanks for your input. So it looks like they're on the right path then, planning to fix Manticore (which is a Kolab-maintained component).
Add a comment...
 
I am doing some experimenting on creating services. While doing so I created a dummy daemon in C that does not work within systemd as long it contains a while loop. The daemon is running if I start it manually in a shell but on systemd it does nothing if it "runs".

You can see the source of the daemon here: http://pastebin.ubuntu.com/14688995/

The daemon has been compiled using gcc -o foo foo.c -lsystemd and uses the service file you can take a look here: http://pastebin.ubuntu.com/14689021/

Can anyone tell me what is going wrong here? Since this daemon is a rather stupid minimal example I was expecting it to just work.
Ubuntu Pastebin. Paste from tvn at Thu, 28 Jan 2016 16:11:11 +0000. Download as text. 1 2 3 4 5 6 7 8 9 10 11 12. #include #include #include int main(){ printf ("Booting up...\n"); while (true) { sleep (1); printf ("Tick\n"); } return 0; }. Download as text.
1
Andreas Henriksson's profile photoTheodor van Nahl's profile photo
4 comments
 
While writing an answer I tested a few things and now everything works as I expected it to work -- with the code and .service mentioned in my post. Maybe I just forgot to do a systemctl --user daemon-reload for a longer period or there has been something else I cannot figure out anymore. Thank you both for your support! The checklist in man 7 daemon will help me a lot while experimenting further on.
Add a comment...
 
Hi!

Is there a way to get the path of a signal with sd-bus?
I added the match with
sd_bus_add_match(), and i'm correctly receiving signals; but once i received the signal, i need to be able to get its path.

Thanks!

1
Federico Di Pierro's profile photo
 
Aaaand once more, i should wait more time before posting.
Sd_bus_message_get_path() should do the trick (i'm not able to test yet but i'm pretty sure it's the right function)!

Edit: yes, it is!
Add a comment...
 
Hi!
I'm trying to get an udisks2 property through sd-bus.
I'm stuck: i cannot understand how to properly retrieve the reply message.
http://codepad.org/xVhgxoxT

It is crashing on
"r = sd_bus_message_read(mess, "ay", &bytes);" .

Note that "&bytes" is just one of the solutions i tried, and i really have no more clues.
My purpose is to copy the bytes array as string in "s".

Obj_path is correct, as i printed and checked it (in fact the "sd_bus_get_property" call won't fail).

Any idea?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33. static void iso_backing_file(char *s, const char *name) { sd_bus_error error = SD_BUS_ERROR_NULL; sd_bus_message *mess = NULL; sd_bus *iso_bus = NULL; char obj_path[PATH_MAX + 1] ...
1
Federico Di Pierro's profile photo
 
http://lists.freedesktop.org/archives/systemd-commits/2013-October/004569.html
found here a working example, my code now looks this way: http://codepad.org/0zYgrYxX. It's working fine.
Add a comment...