[systemd-devel] A question about systemd offline update

2016-08-02 Thread lin webber
hello:
   I have a question about systemd offline update.I want to write a 
shell script to install some deb packages with systemd . I have read docs about 
offline system updates in 
https://www.freedesktop.org/wiki/Software/systemd/SystemUpdates/. but still 
don't know how to write my script . Can you give me a test script about how to 
implement offline updates and a guidance about how to config the .service file.
 thanks very much.
SystemUpdates
www.freedesktop.org
Back to systemd. This document has been replaced by systemd.offline-updates(7) 
man page. Implementing Offline System Updates. This is implemented starting 
with ...


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


Re: [systemd-devel] Getting the exit code of a process under a scope

2016-08-02 Thread Lennart Poettering
On Tue, 02.08.16 10:36, Mrunal Patel (mpa...@redhat.com) wrote:

> Is there a way to get the exit code of a process run under a systemd scope
> using systemd dbus API?

This is not supported. systemd only knows the exit codes of processes
it gets SIGCHLD for (as that's where that info is passed). But scopes
are for processes managed and forked off by *other* subsystems, hence
systemd generally does not get SIGCHLD for the processes and cannot
report them.

Lennart

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


Re: [systemd-devel] Emulate two cron tab entries to start/stop service unit natively?

2016-08-02 Thread John





>
> From: Kai Krakow 
>To: systemd-devel@lists.freedesktop.org 
>Sent: Tuesday, August 2, 2016 6:38 AM
>Subject: Re: [systemd-devel] Emulate two cron tab entries to start/stop 
>service unit natively?
> 
>
>Am Mon, 1 Aug 2016 23:59:13 + (UTC)
>schrieb John :
>
>> Is it possible to use a systemd timer unit to start and stop a
>> service unit according to set times of the day?  In my case,
>> openvpn.service is a forking type if that matters. I can do this
>> using cron, but am wondering if/how to do it with systemd natively.
>> 
>> In cron terms, one could do this like so:
>> # start at 7 AM
>> * 7 * * * systemctl start openvpn.service
>> 
>> 
>> # stop at 5 PM
>> * 17 * * * systemctl stop openvnp.service
>> 
>> The syntax of the timer with differential commands (ie start the
>> service at 7 AM and stop it at 5 PM) isn't clear to me even after
>> consulting `man systemd.time` and `man systemd.timer`.
>
>Create to additional services, openvpn-start.service and
>openvpn-stop.service, which each require openvpn.service to start or
>stop (Wants and Conflicts should work). Those two services should be of
>type one-shot, so they start once and quit without error. They contain
>no exec lines.
>
>Now create two timer units, openvpn-{start,stop}.timer with appropriate
>time definitions and enable those. All other units shouldn't be enabled.


Thank you for the detailed reply! Too bad there isn't a more simplistic 
solution (ie something native in a single timer unit).
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Getting the exit code of a process under a scope

2016-08-02 Thread Mrunal Patel
Is there a way to get the exit code of a process run under a systemd scope
using systemd dbus API?

Thanks,
Mrunal
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] machinectl pull image error

2016-08-02 Thread Maxim Lacrima
Hi!

I am just trying to use machinectl. Here is a command I execute:

maxim@maxim ~ % sudo machinectl --verify=no pull-raw
https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Atomic-23-20151030.x86_64.raw.xz
Failed to transfer image: Message recipient disconnected from message bus
without replying

And corresponding entries in journal:

Aug 02 17:53:25 maxim sudo[9365]:maxim : TTY=pts/1 ; PWD=/home/maxim ;
USER=root ; COMMAND=/usr/bin/machinectl --verify=no pull-raw
https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Atomic-23-20151030.x86_64.raw.xz
Aug 02 17:53:25 maxim sudo[9365]: pam_unix(sudo:session): session opened
for user root by (uid=0)
Aug 02 17:53:25 maxim dbus[373]: [system] Activating via systemd: service
name='org.freedesktop.import1' unit='dbus-org.freedesktop.import1.service'
Aug 02 17:53:25 maxim systemd[1]: Starting Virtual Machine and Container
Download Service...
Aug 02 17:53:25 maxim dbus[373]: [system] Successfully activated service
'org.freedesktop.import1'
Aug 02 17:53:25 maxim systemd[1]: Started Virtual Machine and Container
Download Service.
Aug 02 17:53:25 maxim systemd[1]: systemd-importd.service: Main process
exited, code=killed, status=31/SYS
Aug 02 17:53:25 maxim systemd[1]: systemd-importd.service: Unit entered
failed state.
Aug 02 17:53:25 maxim systemd[1]: systemd-importd.service: Failed with
result 'signal'.
Aug 02 17:53:25 maxim sudo[9365]: pam_unix(sudo:session): session closed
for user root

This is on arch linux system
systemd 231
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP
+GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN

Any help is appreciated.
Thank you.

-- 
Regards,
Maxim
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [RFC] Removal of --share-system from nspawn?

2016-08-02 Thread Lennart Poettering
Hi!

nspawn currently has a command line switch "--share-system", which
allows disabling PID, IPC and UTC namespacing for a container. I'd
like to remove this option, and filed a PR for that:

https://github.com/systemd/systemd/pull/3820

Now, I am pretty sure this option is almost unused, but I'd like
comments on this. Are you a user (or do you known any users) of this?
if so, can you elaborate on why you use it?

Please see the PR for a longer explanation why I think this should
go. 

All comments welcome,

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


Re: [systemd-devel] Emulate two cron tab entries to start/stop service unit natively?

2016-08-02 Thread Kai Krakow
Am Mon, 1 Aug 2016 23:59:13 + (UTC)
schrieb John :

> Is it possible to use a systemd timer unit to start and stop a
> service unit according to set times of the day?  In my case,
> openvpn.service is a forking type if that matters. I can do this
> using cron, but am wondering if/how to do it with systemd natively.
> 
> In cron terms, one could do this like so:
> # start at 7 AM
> * 7 * * * systemctl start openvpn.service
> 
> 
> # stop at 5 PM
> * 17 * * * systemctl stop openvnp.service
> 
> The syntax of the timer with differential commands (ie start the
> service at 7 AM and stop it at 5 PM) isn't clear to me even after
> consulting `man systemd.time` and `man systemd.timer`.

Create to additional services, openvpn-start.service and
openvpn-stop.service, which each require openvpn.service to start or
stop (Wants and Conflicts should work). Those two services should be of
type one-shot, so they start once and quit without error. They contain
no exec lines.

Now create two timer units, openvpn-{start,stop}.timer with appropriate
time definitions and enable those. All other units shouldn't be enabled.

-- 
Regards,
Kai

Replies to list-only preferred.

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


Re: [systemd-devel] firmware update check script

2016-08-02 Thread Mantas Mikulėnas
On Tue, Aug 2, 2016 at 11:19 AM, Stéphane ANCELOT  wrote:

> Hi,
>
> It looks like very complicated making easy thing
>
> I would need only setting up a script that looks for usb media and launch
> a script if available on it (firmware upgrade)
>
> unfortunately, it looks like, graphic display is launched in parallel and
> i am not able doing this in a text only mode, before continuing boot process
>

If you want it to start before something like lightdm.service, just use
Before=lightdm.service? (It's the After that would be more complicated to
do.)

Alternatively, hook the script into basic/sysinit instead of
multi-user.target instead; compare to e.g. systemd-fsck or
systemd-firstboot.

-- 
Mantas Mikulėnas 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] firmware update check script

2016-08-02 Thread Stéphane ANCELOT
Hi,

It looks like very complicated making easy thing

I would need only setting up a script that looks for usb media and launch a 
script if available on it (firmware upgrade)

unfortunately, it looks like, graphic display is launched in parallel and i am 
not able doing this in a text only mode, before continuing boot process

I would need some help to going on.

Regards,
Steph
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] NOARP support (systemd-networkd)

2016-08-02 Thread Susant Sahani

On 08/01/2016 06:56 PM, Zbigniew Jędrzejewski-Szmek wrote:

On Sun, Jul 31, 2016 at 06:08:32AM +0300, Jukka Aho wrote:

If there is a supported way of switching the "NOARP" mode on for a
given interface, or a workaround, I'd be interested in hearing about
it. If there is no support for this at all, I would suggest adding
it.

There's no support currently, and no workaround except doing the
configuration externally through some script.

Susant Sahani quite often reacts to RFEs. It'd be best if you open
one at https://github.com/systemd/systemd/issues/new
and mention @ssahani.

https://github.com/systemd/systemd/pull/3854

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