Re: [systemd-devel] [ANNOUNCE] python-systemd v231

2015-10-29 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Oct 29, 2015 at 02:16:02AM +0100, Michael Biebl wrote:
> Oops, the make check output was cut off
> 
> 2015-10-29 2:14 GMT+01:00 Michael Biebl :
> > $ make check
> > python setup.py build
> > running build
> > running build_py
> > package init file 'systemd/test/__init__.py' not found (or not a regular 
> > file)
> > package init file 'systemd/test/__init__.py' not found (or not a regular 
> > file)
> > running build_ext
> > (cd build/lib.linux-x86_64-2.7 && python -m py.test . ../../docs -v)
> > /usr/bin/python: No module named py
> > Makefile:39: recipe for tar
> 
> Makefile:39: recipe for target 'check' failed
> make: *** [check] Error 1
You need to have py.test installed (for all python versions).
I guess I should have added this to the README.

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


Re: [systemd-devel] Help writing a user service file that will exec a command upon system sleep

2015-10-29 Thread Simon McVittie
On 29/10/15 18:52, John wrote:
> This is an interesting idea but I would like to learn about user units and 
> sleep mode :)

I think the intention is that per-user code deals with sleep by having a
service (daemon) that registers to inhibit suspend; when it is notified
that systemd would like to suspend, it does what it needs to do, then
releases the inhibit to allow suspend to continue.

Here's a working implementation (it also handles two flavours of network
connectivity, but you can ignore those bits), which Telepathy uses to
try to log out from IM services before suspending:
http://cgit.freedesktop.org/telepathy/telepathy-mission-control/tree/src/connectivity-monitor.c

-- 
Simon McVittie
Collabora Ltd. 

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


Re: [systemd-devel] Help writing a user service file that will exec a command upon system sleep

2015-10-29 Thread John

> From: David Timothy Strauss 
>To: John ; "systemd-devel@lists.freedesktop.org" 
> 
>Sent: Wednesday, October 28, 2015 7:54 PM
>Subject: Re: [systemd-devel] Help writing a user service file that will exec a 
>command upon system sleep
> 
>
>
>I read up on PSD, and I expect you're using it for performance/hardware 
>longevity. Correct me if I'm wrong about this.
>
>So, have you considered just mounting your home directory or a volume for 
>things like browser profile data with normally aggressive/unsafe options on a 
>normal file system? You can configure file systems like ext4 to only commit at 
>periodic intervals, and you can also configure your system to commit/sync all 
>file systems before going to sleep. They will buffer writes to memory until 
>committing, and reads will buffer into the kernel's page cache. This option is 
>not crash-safe, but neither is PSD.
>


This is an interesting idea but I would like to learn about user units and 
sleep mode :)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Help writing a user service file that will exec a command upon system sleep

2015-10-29 Thread John




- Original Message -
> From: Simon McVittie 
> To: systemd-devel@lists.freedesktop.org
> Cc: 
> Sent: Thursday, October 29, 2015 3:27 PM
> Subject: Re: [systemd-devel] Help writing a user service file that will exec 
> a command upon system sleep
> 
> On 29/10/15 18:52, John wrote:
>>  This is an interesting idea but I would like to learn about user units and 
> sleep mode :)
> 
> I think the intention is that per-user code deals with sleep by having a
> service (daemon) that registers to inhibit suspend; when it is notified
> that systemd would like to suspend, it does what it needs to do, then
> releases the inhibit to allow suspend to continue.
> 
> Here's a working implementation (it also handles two flavours of network
> connectivity, but you can ignore those bits), which Telepathy uses to
> try to log out from IM services before suspending:
> http://cgit.freedesktop.org/telepathy/telepathy-mission-control/tree/src/connectivity-monitor.c


Hello Simon.  Thank you for the post.  I am not a programmer and cannot really 
read the code you referenced.  Can you point me to a particular line number or 
line numbers?  Since my tool is a bash script, I'm looking to distill out if 
possible the relevant sections and adapt to this use case.  Thank you.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Delete stale *.journal-files from containers

2015-10-29 Thread Peter Paule

Hi Mantas,


journald doesn't know all possible ways other machines' journals might
appear here – the directory might belong to a *running* container, it might
be written to over NFS by a thin client (where the client's journald might
have different policies), it might be imported by journal-remote (where the
admin might want to keep it for archival purposes), and so on.

Therefore journald will not delete journals with other machine-ids, since
doing so would possibly apply two conflicting policies to the same logs –
yours, and the container's/client's.


Thanks a lot for your reply. Ok. Sure. So I need to setup a "find"-job  
and remove them manually. Correct?




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


Re: [systemd-devel] kernel and systemd boot sequence

2015-10-29 Thread Kay Sievers
On Thu, Oct 29, 2015 at 3:26 AM, kennedy  wrote:
> the boot sequence is it right ?
> kernel --> initramfs --> switch_root --> systemd --> init & mount /etc/fstab
> --> user login

http://www.freedesktop.org/software/systemd/man/bootup.html

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


Re: [systemd-devel] kernel and systemd boot sequence

2015-10-29 Thread kennedy
thanks


The local-fs.target will active -.mount and boot.mount which generated by 
systemd-generator.
and -.mount will mount the "/" and boot.mount will mount the "/boot".
who call the switch_root ? and when ?







At 2015-10-29 19:05:33, "Kay Sievers"  wrote:
>On Thu, Oct 29, 2015 at 3:26 AM, kennedy  wrote:
>> the boot sequence is it right ?
>> kernel --> initramfs --> switch_root --> systemd --> init & mount /etc/fstab
>> --> user login
>
>http://www.freedesktop.org/software/systemd/man/bootup.html
>
>Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel