Re: [systemd-devel] Showing plymouth shutdown splash earlier during shutdown process

2012-06-01 Thread Michal Schmidt

On 05/31/2012 05:46 PM, Daniel Drake wrote:

In the case of reboot (or poweroff), what does this mean?
plymouth-reboot.service is queued to start, and prefdm.service is
queued to stop. What does After= mean in this context, who comes
first?


'man systemd.unit' says:
If one unit with an ordering dependency on another unit is shut down 
while the latter is started up, the shut down is ordered before the 
start-up regardless whether the ordering dependency is actually of type 
After= or Before=.



It is like it is waiting for those services to stop before executing.

 How can I find out why?

Based on the above rule, check all the ordering dependencies the unit has:
systemctl show -p After -p Before plymouth-reboot.service

Michal
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] ctrl-s + shutdown

2012-06-01 Thread Lukáš Nykrýn
Hello,
A customer had complained about this behavior:
1) login to system
2) press ctrl+s
3) log to this computer from another machine using ssh
4) type shutdown -h now through ssh 
5) ?

Their problem is that in RHEL5(sysvinit) 5) is nothing until user press
ctrl+q, than shutdown but in RHEL6(upstart) system goes to shutdown
immediately. 

I was not sure which one is correct, so I tried what would systemd
(44-12.fc17) do in this case. 

Result are quite inconsistent. In some cases system shutdowns
immediately, sometime shutdown command hanged and system waited for
ctrl-q and few times ssh disconnect and screen went completely black and
system hanged.

Unfortunately I have only one f17 in virtual to test this, so I want to
ask if somebody else can try it and obvious question is: What is correct
behavior?

Regards
Lukas   


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] ctrl-s + shutdown

2012-06-01 Thread Zbigniew Jędrzejewski-Szmek
On 06/01/2012 12:33 PM, Lukáš Nykrýn wrote:
 Hello,
 A customer had complained about this behavior:
 1) login to system
 2) press ctrl+s
 3) log to this computer from another machine using ssh
 4) type shutdown -h now through ssh 
 5) ?
 
 Their problem is that in RHEL5(sysvinit) 5) is nothing until user press
 ctrl+q, than shutdown but in RHEL6(upstart) system goes to shutdown
 immediately. 
 
 I was not sure which one is correct, so I tried what would systemd
 (44-12.fc17) do in this case. 
Let's put the question in a different way: is it correct for the system
to stop responding if some user presses ctrl+s on a console? I think
that the answer is pretty obvious.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] don't call execute_directory on a binary

2012-06-01 Thread Lennart Poettering
On Thu, 31.05.12 20:09, Matthias Clasen (matthias.cla...@gmail.com) wrote:

 I've noticed
 
 May 31 19:45:10 localhost.localdomain systemd-sleep[9627]: Failed to
 enumerate directory /usr/lib/systemd/systemd-sleep: Not a directory
 
 in my journal.

Applied! Thanks!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] CanSuspend always says 'na'

2012-06-01 Thread Lennart Poettering
On Thu, 31.05.12 21:53, Matthias Clasen (matthias.cla...@gmail.com) wrote:

 It shouldn't, since my system suspends just fine. The attached patch
 should fix that.

Applied! Thanks!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] ctrl-s + shutdown

2012-06-01 Thread Lennart Poettering
On Fri, 01.06.12 12:33, Lukáš Nykrýn (lnyk...@redhat.com) wrote:

 Hello,
 A customer had complained about this behavior:
 1) login to system
 2) press ctrl+s
 3) log to this computer from another machine using ssh
 4) type shutdown -h now through ssh 
 5) ?
 
 Their problem is that in RHEL5(sysvinit) 5) is nothing until user press
 ctrl+q, than shutdown but in RHEL6(upstart) system goes to shutdown
 immediately. 
 
 I was not sure which one is correct, so I tried what would systemd
 (44-12.fc17) do in this case. 
 
 Result are quite inconsistent. In some cases system shutdowns
 immediately, sometime shutdown command hanged and system waited for
 ctrl-q and few times ssh disconnect and screen went completely black and
 system hanged.

Well, whenever an app tries to output something on the console while it
is frozen it will hang. Sooner or later systemd will do this too.

So this is really just a matter of generating output or not.

Not sure if we can do much about this. Maybe using O_NONBLOCK might
help, but we probably should set that for serial consoles, so we should
take real care with this.

 Unfortunately I have only one f17 in virtual to test this, so I want to
 ask if somebody else can try it and obvious question is: What is correct
 behavior?

Of course, ideally stopping the console should not have any impact on
systemd. But I fear this is not entirely fixable right now, unless you
completely turn off all console output in systemd.

But admittedly I haven't checked in detail how O_NONBLOCK and a stopped
VT really interact, need to check this...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] PATCH: add missing header include

2012-06-01 Thread Alexey Shabalin
2011/8/19 Lennart Poettering lenn...@poettering.net:
 On Thu, 18.08.11 16:18, Frederic Crozat (fcro...@suse.com) wrote:

 Le jeudi 18 août 2011 à 16:00 +0200, Lennart Poettering a écrit :
  On Thu, 18.08.11 15:50, Frederic Crozat (fcro...@suse.com) wrote:
 
   Hi,
  
   MS_REC is not always defined in sys/mount.h. linux/fs.h should be
   included, since it is always defined there.
 
  Not always? Can you be more specific please? Which version of glibc is 
  that?

 Well, I haven't found it on glibc 2.11.3, shipped in latest openSUSE (it
 was added by Ulrich in 02/2010, see
 http://sources.redhat.com/bugzilla/show_bug.cgi?id=11235 ie for glib
 2.12).

 Another solution could be to add it to missing.h.

 I wasn't sure which one was best, since namespace.c is including
 linux/fs.h, because of MS_REC and MS_MS_UNBINDABLE.

 I merged your first patch, looks fine.

 I was just curious whether this was some compatibility hack for a
 non-glibc libc. usually my recommendation for those is to ask the libc
 to be fixed, not systemd...

 Thanks for the patch,

 Lennart


Hi.

mount-setup.c in systemd-184 have the same problem with old glibc:

  CC src/core/mount-setup.o
src/core/mount-setup.c:64:92: error: 'MS_STRICTATIME' undeclared here
(not in a function)
src/core/mount-setup.c: In function 'mount_setup_early':
src/core/mount-setup.c:161:9: error: duplicate case value
src/core/mount-setup.c:161:9: error: previously used here
make[2]: *** [src/core/mount-setup.o] Error 1

rpm -q glibc
glibc-2.11.3-alt7

-- 
Alexey Shabalin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] PATCH: add missing header include

2012-06-01 Thread Lennart Poettering
On Fri, 01.06.12 20:35, Alexey Shabalin (a.shaba...@gmail.com) wrote:

 
 mount-setup.c in systemd-184 have the same problem with old glibc:
 
   CC src/core/mount-setup.o
 src/core/mount-setup.c:64:92: error: 'MS_STRICTATIME' undeclared here
 (not in a function)
 src/core/mount-setup.c: In function 'mount_setup_early':
 src/core/mount-setup.c:161:9: error: duplicate case value
 src/core/mount-setup.c:161:9: error: previously used here
 make[2]: *** [src/core/mount-setup.o] Error 1
 
 rpm -q glibc
 glibc-2.11.3-alt7

I have added MS_STRICTATIME to missing.h now. This should fix your
problem. Please test!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [ANNOUNCE] systemd 183

2012-06-01 Thread Richard Hughes
On 25 May 2012 13:28, Lennart Poettering lenn...@poettering.net wrote:
        * A framework for implementing offline system updates is now
          integrated, for details see:
          http://freedesktop.org/wiki/Software/systemd/SystemUpdates

Seeing as system-update.target is now shipped in systemd itself,
wouldn't it make sense also to have r /system-update in
/usr/lib/tmpfiles.d/systemd.conf as well?

Richard.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Adding a service file to run with system-update.target

2012-06-01 Thread Richard Hughes
I've been playing with the offline updates thing a bit. Is this the
kind of service file that PackageKit should install into
/usr/lib/systemd/system/ ?

[Unit]
Description=Updates the operating system whilst offline
DefaultDependencies=no
After=system-update.target

[Service]
Type=oneshot
ExecStart=/usr/libexec/pk-offline-update

I'm guessing I also have to do something like ln -sf
/lib/systemd/system/packagekit-offline-update.service
/etc/systemd/system/system-update.target.wants/packagekit-offline-update.service
as well.

Thanks,

Richard.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Adding a service file to run with system-update.target

2012-06-01 Thread Mathieu Bridon
On Fri, 2012-06-01 at 23:42 +0100, Richard Hughes wrote:
 I've been playing with the offline updates thing a bit. Is this the
 kind of service file that PackageKit should install into
 /usr/lib/systemd/system/ ?
 
 [Unit]
 Description=Updates the operating system whilst offline
 DefaultDependencies=no
 After=system-update.target
 
 [Service]
 Type=oneshot
 ExecStart=/usr/libexec/pk-offline-update
 
 I'm guessing I also have to do something like ln -sf
 /lib/systemd/system/packagekit-offline-update.service
 /etc/systemd/system/system-update.target.wants/packagekit-offline-update.service
 as well.

You can simplify that last one by adding the following to the unit file:

[Install]
WantedBy=system-update.target

Then you can use systemctl enable packagekit-offline-update.service


-- 
Mathieu


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Adding a service file to run with system-update.target

2012-06-01 Thread Lennart Poettering
Heya,

Please make this a normal unit file, I.e. drop the DefaultDependencies, and 
drop the After=system-update.target.

But do add WantedBy=system-update.target in the Install section. Or, 
alternatively, symlink this into 
/usr/lib/systemd/system/system-update.target.wants/ in the package so that 
there is no need to explicitly enable the unit.  (I'd probably recommend the 
latter to avoid any fragility here).

And Type=simple should be good for this too, hence you can drop the Type= 
entirely.

Lennart (who is about to step on a plane)

Richard Hughes hughsi...@gmail.com wrote:

I've been playing with the offline updates thing a bit. Is this the
kind of service file that PackageKit should install into
/usr/lib/systemd/system/ ?

[Unit]
Description=Updates the operating system whilst offline
DefaultDependencies=no
After=system-update.target

[Service]
Type=oneshot
ExecStart=/usr/libexec/pk-offline-update

I'm guessing I also have to do something like ln -sf
/lib/systemd/system/packagekit-offline-update.service
/etc/systemd/system/system-update.target.wants/packagekit-offline-update.service
as well.

Thanks,

Richard.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel