Re: [systemd-devel] How to automount

2015-09-21 Thread Mantas Mikulėnas
On Tue, Sep 22, 2015 at 7:38 AM, Paul D. DeRocco wrote: > > From: Mantas Mikulenas [mailto:graw...@gmail.com] > > > > > I don't think there's any way to have something auto-unmount > > > > There certainly is - udev has been unmounting unplugged > > drives for many years. It's done by default. > >

Re: [systemd-devel] How to automount

2015-09-21 Thread Paul D. DeRocco
> From: Mantas Mikulenas [mailto:graw...@gmail.com] > > > I don't think there's any way to have something auto-unmount > > There certainly is - udev has been unmounting unplugged > drives for many years. It's done by default. Sure, you can get it to unmount after you've removed it, but that's

Re: [systemd-devel] How to automount

2015-09-21 Thread Mantas Mikulėnas
> I don't think there's any way to have something auto-unmount There certainly is – udev has been unmounting unplugged drives for many years. It's done by default. On Mon, Sep 21, 2015, 23:10 Paul D. DeRocco wrote: > > From: Umut Tezduyar Lindskog [mailto:u...@tezduyar.com] > > > > I am not sur

[systemd-devel] RFC: removing initctl support

2015-09-21 Thread Lennart Poettering
Heya! Since a long time systemd has been shipping with two-way compat support for /dev/initctl, and I am tempted to remove it. Before I do so, I'd like some input on the relevance of this interface: a) there's support in systemctl to reboot the system by sending the right bytes to /dev/initctl

Re: [systemd-devel] How to automount

2015-09-21 Thread Paul D. DeRocco
> From: Umut Tezduyar Lindskog [mailto:u...@tezduyar.com] > > I am not sure if automount is really the right way to go. In the end, > your automount path will fail if your device is not plugged in. A little experimenting showed you're right. > You could always use udev rules (ENV{SYSTEMD_WANTS}

Re: [systemd-devel] How to turn off some network interface?

2015-09-21 Thread David Herrmann
Hi On Mon, Sep 21, 2015 at 8:35 PM, Reindl Harald wrote: > Am 21.09.2015 um 20:23 schrieb David Herrmann: >> On Mon, Sep 21, 2015 at 7:52 PM, Reindl Harald >> wrote: Why do you use networkd at all? Just disable it via `systemctl disable systemd-networkd` >>> >>> in the systemd-world yo

Re: [systemd-devel] How to turn off some network interface?

2015-09-21 Thread Reindl Harald
Am 21.09.2015 um 20:23 schrieb David Herrmann: On Mon, Sep 21, 2015 at 7:52 PM, Reindl Harald wrote: Why do you use networkd at all? Just disable it via `systemctl disable systemd-networkd` in the systemd-world you need to *mask* stuff instead just disable, i had networkd also running on m

Re: [systemd-devel] How to turn off some network interface?

2015-09-21 Thread David Herrmann
Hi On Mon, Sep 21, 2015 at 7:52 PM, Reindl Harald wrote: > > Am 21.09.2015 um 19:39 schrieb David Herrmann: >> >> On Sun, Sep 13, 2015 at 10:55 AM, Manuel Reimer >> wrote: >>> >>> Hello, >>> >>> it seems to be impossible to just stop networkd (keeps starting itself >>> again). >>> >>> If I use "

Re: [systemd-devel] Incorrect use return value of mount_one in mount_setup_early/mount_setup?

2015-09-21 Thread David Herrmann
Hi On Tue, Sep 15, 2015 at 3:37 AM, cee1 wrote: > Hi all, > > mount_one will return 1 if a mount action is performed; 0 for no mount > performed; and <0 for an error occurred. Right? > > In mount_setup, we have the following logic: > """ > for (i = 0; i < ELEMENTSOF(mount_table); i ++) { >

Re: [systemd-devel] How to turn off some network interface?

2015-09-21 Thread Reindl Harald
Am 21.09.2015 um 19:39 schrieb David Herrmann: On Sun, Sep 13, 2015 at 10:55 AM, Manuel Reimer wrote: Hello, it seems to be impossible to just stop networkd (keeps starting itself again). If I use "ifconfig" to turn off one NIC, then networkd immediately restarts it. What do I have to do to

Re: [systemd-devel] How to turn off some network interface?

2015-09-21 Thread Reindl Harald
Am 21.09.2015 um 19:40 schrieb David Herrmann: On Sun, Sep 13, 2015 at 1:40 PM, Reindl Harald wrote: Am 13.09.2015 um 13:28 schrieb Rosen, Rami: What do you mean by stopping networkd, can you elaborate a bit about what you want to achieve? If you want to stop the service, simply run "sys

Re: [systemd-devel] how-to run instantiated units from templates one after the other

2015-09-21 Thread David Herrmann
Hi On Fri, Sep 18, 2015 at 8:34 PM, Dmitry Karpov wrote: > I have a template for creating the backup: > > backup@.service > > [Unit] > > Description=Instance %i > > [Service] > > ExecStart=/bin/sh -c "echo do backup job for %i" > > [Install] > > WantedBy=maintenance.target > > and some target: >

Re: [systemd-devel] systemd-firstboot skip root password initialisation if /etc/shadow is present

2015-09-21 Thread David Herrmann
Hi On Fri, Sep 18, 2015 at 6:31 PM, Francis Moreau wrote: > Hi, > > I find odd that systemd-firstboot skips root password init if > /etc/shadow exists because AFAICS this file is always part of a > minimal rootfs after being setup by an installer. Indeed it's > populated during package installati

Re: [systemd-devel] Implicit unit dependency on slice might be too weak ?

2015-09-21 Thread David Herrmann
Hi On Mon, Sep 21, 2015 at 4:50 PM, Francis Moreau wrote: > Hi, > > If a unit depends on a slice, a Wants=machine.slice is automatically > added to the unit constraints. > > Why is "Requires=machine.slice" not prefered instead ? Usually "Wants=" is preferred as it makes the units more fail-safe.

Re: [systemd-devel] How to turn off some network interface?

2015-09-21 Thread David Herrmann
Hi On Sun, Sep 13, 2015 at 1:40 PM, Reindl Harald wrote: > > > Am 13.09.2015 um 13:28 schrieb Rosen, Rami: >> >> What do you mean by stopping networkd, can you elaborate a bit about what >> you want to achieve? >> >> If you want to stop the service, simply run >> "systemctl stop systemd-networkd"

Re: [systemd-devel] How to turn off some network interface?

2015-09-21 Thread David Herrmann
Hi On Sun, Sep 13, 2015 at 10:55 AM, Manuel Reimer wrote: > Hello, > > it seems to be impossible to just stop networkd (keeps starting itself > again). > > If I use "ifconfig" to turn off one NIC, then networkd immediately restarts > it. > > What do I have to do to gain back control over my netwo

Re: [systemd-devel] "StopWhenUnneeded"-like option for socket-activated services?

2015-09-21 Thread David Herrmann
Hi On Thu, Sep 17, 2015 at 1:02 PM, Laércio de Sousa wrote: > Hi there! > > I have a curiosity: is there some way to systemd to detect when all > connections to a given socket are closed, so that the service assigned to > that socket unit can be automatically stopped (but the socket unit itself >

Re: [systemd-devel] how-to run instantiated units from templates one after the other

2015-09-21 Thread Ian Geiser
I have a similar problem, but from what I can tell with the current templates this is not possible. I ended up using an internal script that would loop over the process. On 09/18/2015 02:34 PM, Dmitry Karpov wrote: I have a template for creating the backup: backup@.service [Unit] Descripti

Re: [systemd-devel] PATCH: src/udev/ata_id/ata_id.c: WWN recognition fails on big-endian systems

2015-09-21 Thread Lennart Poettering
On Fri, 18.09.15 19:44, Tom Lyon (p...@drivescale.com) wrote: > --- a/src/udev/ata_id/ata_id.c > +++ b/src/udev/ata_id/ata_id.c > @@ -485,6 +485,10 @@ int main(int argc, char *argv[]) > disk_identify_fixup_uint16(identify.byte, 90); /* > time required for enhanced SECURITY ER

Re: [systemd-devel] [PATCH] Fix: Cannot call sd_pid_notify_with_fds with valid pid

2015-09-21 Thread Lennart Poettering
On Sat, 19.09.15 18:54, Benjamin Robin (d...@benjarobin.fr) wrote: > The tool called this way: "systemd-notify --pid=$$" is not working > > When calling sd_pid_notify* functions with a valid pid (pid != 0), > the sendmsg failed. > The msg_controllen is invalid, because CMSG_SPACE(0) is not equal

Re: [systemd-devel] [PATCH] systemd-notify: Always pass a valid pid to sd_pid_notify

2015-09-21 Thread Lennart Poettering
On Sat, 19.09.15 23:46, Benjamin Robin (d...@benjarobin.fr) wrote: > If the option --pid was used, take the pid from this option, unless take > the parend pid. Using 0 as pid (ucred of systemd-notify) will result 99% of > the > time in a failure with this error: "Cannot find unit for notify messa

[systemd-devel] Implicit unit dependency on slice might be too weak ?

2015-09-21 Thread Francis Moreau
Hi, If a unit depends on a slice, a Wants=machine.slice is automatically added to the unit constraints. Why is "Requires=machine.slice" not prefered instead ? Thanks. -- Francis ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http:/

Re: [systemd-devel] How to automount

2015-09-21 Thread Umut Tezduyar Lindskog
I am not sure if automount is really the right way to go. In the end, your automount path will fail if your device is not plugged in. You could always use udev rules (ENV{SYSTEMD_WANTS}='media-ext.mount') to mount the volume. http://www.freedesktop.org/software/systemd/man/systemd.device.html Umu