[systemd-devel] [PATCH] unit-name: fix unit name escaping

2010-10-01 Thread Mike Kelly
we want to do a bitwise shift, not a greater-than comparision --- src/unit-name.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/unit-name.c b/src/unit-name.c index 2e2948a..868d13e 100644 --- a/src/unit-name.c +++ b/src/unit-name.c @@ -211,7 +211,7 @@ static char* d

Re: [systemd-devel] Forgot break in switch? (+ PATCH)

2010-10-01 Thread Matthias Schiffer
As I didn't get any comments on my last mail, I'm trying again, now with a patch attached :-D I don't know if this patch is correct or if there is any reason that break is missing, but applying it fixes an assertion fail for me. systemd hits the assertion in the default branch of the switch when

Re: [systemd-devel] [PATCH 3/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
1;2591;0cOn Fri, 01.10.10 07:11, Andrey Borzenkov ([email protected]) wrote: > > - Call shutdown > > If one step fail, shutdown will be aborted > May we have them as three different units, please? > - killall > - umountall > - shutdown I don't think we want that, as Gustavo already pointed out.

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 21:01, Andrey Borzenkov ([email protected]) wrote: > > Fri, 1 Oct 2010 18:41:24 +0200 письмо от Lennart Poettering > : > > > In short: I don't think this is a problem and we already have all the > > right hooks to get rid of the mount points and services correctly and > > clean

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 14:02, Gustavo Sverzut Barbieri ([email protected]) wrote: > do we have a consensus over: > - handling of devicemapper? needed. > - umount loop? shouldn't be required... needed. > - waitpid() after SIGKILL needed. > - is SIGSTOP -> SIGXYZ -> SIGCONT re

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 11:37, Gustavo Sverzut Barbieri ([email protected]) wrote: > > If you do this then it is probably wise to make sure that the SIGTERM is > > delivered for all processes at the same time and not one after the > > other, hence it is recommended to use kill(-1, SIGSTOP) before

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Michael Biebl
2010/10/1 Lennart Poettering : > On Fri, 01.10.10 18:16, Michael Biebl ([email protected]) wrote: > >> >> 2010/10/1 Fabiano Fidêncio : >> > About fuse, Which is the problem in try to umount using umount2? >> >> I'm not an expert regarding fuse, but say I have a partition mounted >> using ntfs-3g. >>

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Gustavo Sverzut Barbieri
On Fri, Oct 1, 2010 at 1:55 PM, Lennart Poettering wrote: > On Fri, 01.10.10 13:53, Gustavo Sverzut Barbieri ([email protected]) > wrote: > >> > As mentioned, Fabianos code is intended as last resort. The proper order >> > in which to shut down stuff should be ensured with with the usual >>

Re: [systemd-devel] [PATCH 1/4] Adding halt bin ary to shutdown the system

2010-10-01 Thread Andrey Borzenkov
Fri, 1 Oct 2010 18:41:24 +0200 письмо от Lennart Poettering : > In short: I don't think this is a problem and we already have all the > right hooks to get rid of the mount points and services correctly and > cleanly. Hmmm... On my system home.mount and tmp.mount always fail on shutdown (I was l

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 13:53, Gustavo Sverzut Barbieri ([email protected]) wrote: > > As mentioned, Fabianos code is intended as last resort. The proper order > > in which to shut down stuff should be ensured with with the usual > > brefore/after dependencies. > > yes! > > Just one thing: do we

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Gustavo Sverzut Barbieri
On Fri, Oct 1, 2010 at 1:50 PM, Lennart Poettering wrote: > On Fri, 01.10.10 18:16, Michael Biebl ([email protected]) wrote: > >> >> 2010/10/1 Fabiano Fidêncio : >> > About fuse, Which is the problem in try to umount using umount2? >> >> I'm not an expert regarding fuse, but say I have a partition

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 18:16, Michael Biebl ([email protected]) wrote: > > 2010/10/1 Fabiano Fidêncio : > > About fuse, Which is the problem in try to umount using umount2? > > I'm not an expert regarding fuse, but say I have a partition mounted > using ntfs-3g. > If I kill the ntfs-3g process, the mou

Re: [systemd-devel] [PATCH 2/4] special shutdown targets will now cause manager to exit.

2010-10-01 Thread Gustavo Sverzut Barbieri
On Fri, Oct 1, 2010 at 1:33 PM, Lennart Poettering wrote: > On Fri, 01.10.10 11:44, Gustavo Sverzut Barbieri ([email protected]) > wrote: > >> >> On Fri, Oct 1, 2010 at 10:54 AM, Lennart Poettering >> wrote: >> > On Fri, 01.10.10 02:28, Gustavo Sverzut Barbieri ([email protected]) >

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 16:50, Michael Biebl ([email protected]) wrote: > > 2010/10/1 Gustavo Sverzut Barbieri : > > On Fri, Oct 1, 2010 at 11:36 AM, Michael Biebl wrote: > >> 2010/10/1 Gustavo Sverzut Barbieri : > >>> From: Fabiano Fidencio > >>> > >>> This functions are working as follows: > >>>    -

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 16:36, Michael Biebl ([email protected]) wrote: > > 2010/10/1 Gustavo Sverzut Barbieri : > > From: Fabiano Fidencio > > > > This functions are working as follows: > >    - Send a SIGTERM to all process > >    - Send a SIGKILL to all process > >    - Try to umount all mount points

Re: [systemd-devel] [PATCH 2/4] special shutdown targets will now cause manager to exit.

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 11:44, Gustavo Sverzut Barbieri ([email protected]) wrote: > > On Fri, Oct 1, 2010 at 10:54 AM, Lennart Poettering > wrote: > > On Fri, 01.10.10 02:28, Gustavo Sverzut Barbieri ([email protected]) > > wrote: > > > >> +++ b/src/target.c > >> @@ -172,6 +172,14 @@ sta

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Michael Biebl
2010/10/1 Fabiano Fidêncio : > About fuse, Which is the problem in try to umount using umount2? I'm not an expert regarding fuse, but say I have a partition mounted using ntfs-3g. If I kill the ntfs-3g process, the mount will go away. During your "kill" stage, the order of processes being killed i

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Michael Biebl
2010/10/1 Michael Biebl : > 2010/10/1 Gustavo Sverzut Barbieri : >> From: Fabiano Fidencio >> >> This functions are working as follows: >>    - Send a SIGTERM to all process >>    - Send a SIGKILL to all process >>    - Try to umount all mount points >>    - Try to remount read-only all mount poin

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Bill Nottingham
Fabiano Fidêncio ([email protected]) said: > > Sorry, I don't understand what you are saying. > > > > Say I have an NFS and/or fuse mount in /etc/fstab. > > Which unit file you are talking about should be dealing with > > unmounting this nfs mount? > > NFS is being umounted. I'm passing MNT

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Gustavo Sverzut Barbieri
On Fri, Oct 1, 2010 at 11:50 AM, Michael Biebl wrote: > 2010/10/1 Gustavo Sverzut Barbieri : >> On Fri, Oct 1, 2010 at 11:36 AM, Michael Biebl wrote: >>> 2010/10/1 Gustavo Sverzut Barbieri : From: Fabiano Fidencio This functions are working as follows:    - Send a SIGTERM to

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Fabiano Fidêncio
On Fri, Oct 1, 2010 at 11:50 AM, Michael Biebl wrote: > 2010/10/1 Gustavo Sverzut Barbieri : >> On Fri, Oct 1, 2010 at 11:36 AM, Michael Biebl wrote: >>> 2010/10/1 Gustavo Sverzut Barbieri : From: Fabiano Fidencio This functions are working as follows:    - Send a SIGTERM to

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Michael Biebl
2010/10/1 Gustavo Sverzut Barbieri : > On Fri, Oct 1, 2010 at 11:36 AM, Michael Biebl wrote: >> 2010/10/1 Gustavo Sverzut Barbieri : >>> From: Fabiano Fidencio >>> >>> This functions are working as follows: >>>    - Send a SIGTERM to all process >>>    - Send a SIGKILL to all process >>>    - Try

Re: [systemd-devel] [PATCH 2/4] special shutdown targets will now cause manager to exit.

2010-10-01 Thread Gustavo Sverzut Barbieri
On Fri, Oct 1, 2010 at 10:54 AM, Lennart Poettering wrote: > On Fri, 01.10.10 02:28, Gustavo Sverzut Barbieri ([email protected]) > wrote: > >> +++ b/src/target.c >> @@ -172,6 +172,14 @@ static int target_start(Unit *u) { >>          assert(t->state == TARGET_DEAD); >> >>          target_se

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Gustavo Sverzut Barbieri
On Fri, Oct 1, 2010 at 11:36 AM, Michael Biebl wrote: > 2010/10/1 Gustavo Sverzut Barbieri : >> From: Fabiano Fidencio >> >> This functions are working as follows: >>    - Send a SIGTERM to all process >>    - Send a SIGKILL to all process >>    - Try to umount all mount points >>    - Try to rem

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Gustavo Sverzut Barbieri
I'm replying to this as couple of the bad ideas were my fault :-) On Fri, Oct 1, 2010 at 10:52 AM, Lennart Poettering wrote: > On Fri, 01.10.10 02:28, Gustavo Sverzut Barbieri ([email protected]) > wrote: > >> From: Fabiano Fidencio >> >> This functions are working as follows: >>     - S

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Michael Biebl
2010/10/1 Gustavo Sverzut Barbieri : > From: Fabiano Fidencio > > This functions are working as follows: >    - Send a SIGTERM to all process >    - Send a SIGKILL to all process >    - Try to umount all mount points >    - Try to remount read-only all mount points that can't >    be umounted Wha

Re: [systemd-devel] [PATCH 2/4] special shutdown targets will now cause manager to exit.

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 02:28, Gustavo Sverzut Barbieri ([email protected]) wrote: > +++ b/src/target.c > @@ -172,6 +172,14 @@ static int target_start(Unit *u) { > assert(t->state == TARGET_DEAD); > > target_set_state(t, TARGET_ACTIVE); > + > +if (unit_has_name(u, SPECI

Re: [systemd-devel] [PATCH 1/4] Adding halt binary to shutdown the system

2010-10-01 Thread Lennart Poettering
On Fri, 01.10.10 02:28, Gustavo Sverzut Barbieri ([email protected]) wrote: > From: Fabiano Fidencio > > This functions are working as follows: > - Send a SIGTERM to all process > - Send a SIGKILL to all process > - Try to umount all mount points > - Try to remount read-on