Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-08 Thread Dan Nicholson
On Fri, Dec 6, 2024 at 3:16 PM David Elie-Dit-Cosaque wrote: > > Hi All, > > I am trying to create a systemd service that would execute a script at > shutdown before any other services start receiving shutdown notifications. I > came up with this: > > [Service] > Type=oneshot > RemainAfterExit=t

Re: [systemd-devel] Masking mount units

2024-10-31 Thread Dan Nicholson
On Thu, Oct 31, 2024 at 10:23 AM Lennart Poettering wrote: > > On Do, 31.10.24 09:03, Phillip Susi (ph...@thesusis.net) wrote: > > > Lennart Poettering writes: > > > > Yes, but then it reads the disk and auto mounts a partition just because > > someone ran parted print. Printing the partition ta

Re: [systemd-devel] Masking mount units

2024-10-29 Thread Dan Nicholson
On Tue, Oct 29, 2024 at 6:28 AM Phillip Susi wrote: > > So if you want to prevent automounting entirely you have to... open the > disk device read only and take the bsd lock, and hold it until after > closing the write file descriptor? Plus probably a little more time to > give udev a chance to t

Re: [systemd-devel] "systemd-path systemd-search-user-unit" does not match reality

2024-07-26 Thread Dan Nicholson
On Fri, Jul 26, 2024 at 9:59 AM Dan Nicholson wrote: > > On Fri, Jul 26, 2024 at 6:50 AM Vladimir Panteleev > wrote: > > > > This seems to work: > > > > cat > ~/.config/systemd/user.conf < > [Manager] > > ManagerEnvironment="XDG_DATA_DIRS=

Re: [systemd-devel] "systemd-path systemd-search-user-unit" does not match reality

2024-07-26 Thread Dan Nicholson
On Fri, Jul 26, 2024 at 6:50 AM Vladimir Panteleev wrote: > > This seems to work: > > cat > ~/.config/systemd/user.conf < [Manager] > ManagerEnvironment="XDG_DATA_DIRS=%h/.nix-profile/share" > EOF ManagerEnvironment only affects the environment variables for the systemd user process. To propagate

Re: [systemd-devel] Scheduling 3 periodic jobs using systemd

2024-07-15 Thread Dan Nicholson
now = datetime.now() if now.day == 1: # Monthly backups on the first of the month monthly_backup() if now.weekday() == 6: # Weekly backups on Sunday weekly_backup() daily_backup() # Always perform daily backups This is triggered from a daily systemd timer. -- Dan Nicholson | Endless

Re: [systemd-devel] systemd prerelease 256-rc1

2024-04-26 Thread Dan Nicholson
That's doubly so for something like this where it's touching critical boot files. Doing something wrong there may make someone's system unusable. So, while I do agree with the sentiment that /boot/efi is a bad idea and should not be done anymore, I have a lot of sympathy for Fedora continuing to use it. -- Dan Nicholson | Endless OS Foundation

Re: [systemd-devel] (solved) Re: How to chain services driven by a timer?

2024-04-18 Thread Dan Nicholson
On Thu, Apr 18, 2024 at 8:12 AM Brian Reichert wrote: > > On Wed, Apr 17, 2024 at 03:03:16PM -0600, Dan Nicholson wrote: > > I assume that this is just a script that does some post-processing on > > log files. In that case, I suggest that you use Type=oneshot with > >

Re: [systemd-devel] (solved) Re: How to chain services driven by a timer?

2024-04-17 Thread Dan Nicholson
On Wed, Apr 17, 2024 at 2:49 PM Brian Reichert wrote: > > [Service] > Type=simple > > ExecStart=/usr/local/sbin/post-logrotate I assume that this is just a script that does some post-processing on log files. In that case, I suggest that you use Type=oneshot with RemainAfterExit=no (the defa

Re: [systemd-devel] How to chain services driven by a timer?

2024-04-10 Thread Dan Nicholson
On Wed, Apr 10, 2024 at 1:32 PM Brian Reichert wrote: > > On Wed, Apr 10, 2024 at 10:21:32PM +0300, Andrei Borzenkov wrote: > > On 10.04.2024 22:04, Brian Reichert wrote: > > > [Install] > > > WantedBy=logrotate.service > > > > > > > Links in [Install] section are created by "systemctl enable"

Re: [systemd-devel] How to chain services driven by a timer?

2024-04-10 Thread Dan Nicholson
On Wed, Apr 10, 2024 at 1:21 PM Andrei Borzenkov wrote: > > On 10.04.2024 22:04, Brian Reichert wrote: > > On Wed, Apr 10, 2024 at 09:06:09AM -0600, Dan Nicholson wrote: > >> On Wed, Apr 10, 2024 at 8:50???AM Brian Reichert > >> wrote: > >>> > >

Re: [systemd-devel] How to chain services driven by a timer?

2024-04-10 Thread Dan Nicholson
On Wed, Apr 10, 2024 at 8:50 AM Brian Reichert wrote: > > My current service file: > > [Unit] > Description=Activities after logrotation > > Requires=logrotate.service > Wants=logrotate.service > After=logrotate.service > > [Service] > #Type=oneshot > Type=simple > > ExecStart=/u

Re: Mask Unit files over DBus doesn't work?

2023-12-14 Thread Dan Nicholson
On Thu, Dec 14, 2023 at 8:35 AM Dan Nicholson wrote: > > On Thu, Dec 14, 2023 at 3:57 AM Gyorgy Szekely wrote: > > > > This is what happens when I use DBus: (with busctl for the sake of this > > discussion) > > > > $ busctl call org.freedeskto

Re: Mask Unit files over DBus doesn't work?

2023-12-14 Thread Dan Nicholson
On Thu, Dec 14, 2023 at 3:57 AM Gyorgy Szekely wrote: > > This is what happens when I use DBus: (with busctl for the sake of this > discussion) > > $ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 > org.freedesktop.systemd1.Manager MaskUnitFiles asbb 1 > serial-getty@ttymxc0

Re: [systemd-devel] idle home NFS gets unmounted although user is still logged in

2023-05-16 Thread Dan Nicholson
On Tue, May 16, 2023 at 5:54 AM Frank Steiner wrote: > > I changed the idle-time to 1 minute for debugging. What I can see > 20 seconds before the umount happens: > > bioserver3 /etc/systemd# lsof /home/b > COMMAND PIDUSER FD TYPE DEVICE SIZE/OFF NODE NAME > jupyterhu 14150 biouse

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-05-01 Thread Dan Nicholson
We just run preset-all near the end of our image (really ostree) build after all packages have been installed and nearly all customizations have been applied. Then you're recording the state of the enabled and disabled units in the image. -- Dan Nicholson | Endless OS Foundation On Mon,

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Dan Nicholson
For Endless OS we went the opposite way under the idea that we don't want to have to go add an entry for every service that might get added when the packages change. Basically we work under the assumption that a package included in the OS that provides a service usually should be enabled. So, we di

Re: [systemd-devel] systemd-devel Digest, Vol 155, Issue 13

2023-03-20 Thread Dan Nicholson
On Mon, Mar 20, 2023 at 11:27 AM Lal, Arun wrote: > > Hi, > > Can someone help me in finding the right way to use polkit. > So that dbus method calls can be made by non-root user to an dbus-interface > of an application running in root. > > Right now method call fail in "check access" function.

Re: [systemd-devel] Execute a script/program at the start of a graphical session

2022-05-12 Thread Dan Nicholson
On Thu, May 12, 2022 at 5:31 AM Gerion Entrup wrote: > > The broader question is: Is there a way to start a script at the > beginning of a graphical session (but after X or the Wayland compositor > have started) which is independent of the login manager or desktop > environment? You can use an XD

Re: [systemd-devel] Splitting sd-boot from systemd/bootctl for enabling sd-boot in Fedora

2022-04-27 Thread Dan Nicholson
On Wed, Apr 27, 2022 at 9:10 AM Neal Gompa wrote: > > Note that it means Fedora CI, pull requests from contributors, and > releng auto-rebuilds will no longer work. Maintainers basically > sign-on to do all of those things manually and have to be responsive > for doing it. You will get FTBFS ticke

Re: [systemd-devel] Splitting sd-boot from systemd/bootctl for enabling sd-boot in Fedora

2022-04-27 Thread Dan Nicholson
On Wed, Apr 27, 2022 at 9:01 AM Michael Biebl wrote: > > Slightly related > https://salsa.debian.org/systemd-team/systemd/-/merge_requests/138 > [sd-boot split] > https://salsa.debian.org/systemd-team/systemd/-/merge_requests/132 > [Draft: Prepare for EFI signing] Oh, nice. We've been signing sd-

Re: [systemd-devel] Waiting for (transient) hostname configuration

2022-04-20 Thread Dan Nicholson
On Wed, Apr 20, 2022 at 2:10 PM Alessio Igor Bogani wrote: > > Hi Lennart, > > On Wed, 20 Apr 2022 at 16:47, Lennart Poettering > wrote: > [...] > > > I use systemd-networkd and systemd-networkd-wait-online is enabled but > > > unfortunately it doesn't work anyway. > > If you don't mind I show y

Re: [systemd-devel] sd_bus_process() + sd_bus_wait() is it not suitable for application?

2022-01-22 Thread Dan Nicholson
Aren't your leaking reply there? You don't seem to be unreffing it and it's not being returned to someone else to do it either. On Sat, Jan 22, 2022, 3:12 AM www wrote: > +Add the implementation code of the method. > > *static int method_load_info(sd_bus_message *message, void *userdata, > sd_bu

Re: [systemd-devel] Mobile broadband modems support in systemd-networkd

2021-08-24 Thread Dan Nicholson
On Mon, Aug 23, 2021 at 2:41 PM Bruce A. Johnson wrote: > I suspect that ModemManager needs to be changed to inform systemd-networkd. Nothing needs to change in ModemManager. networkd would need to be changed to integrate with ModemManager over D-Bus. The communication would go in 2 directions -

Re: [systemd-devel] syscvall-filters killing CGI after update to Fedora 33

2021-04-21 Thread Dan Nicholson
On Mon, Apr 19, 2021 at 10:24 AM Reindl Harald wrote: > > after a long time using this SystemCallFilter perl-cgi with Fedora 33 > get killed - anyone an idea what changed that's obviously covered by the > second line > > SystemCallFilter=@system-service @network-io @privileged > SystemCallFilter=~

Re: [systemd-devel] Minimize systemd for kdump's initramfs

2020-01-03 Thread Dan Nicholson
On Wed, Jan 1, 2020 at 9:21 AM Kairui Song wrote: > > Hi all, > > I noticed there is a Fedora minimization project which seems could be > a bit related to the thing I'm trying to do, and this could be a > generic topic. > > What I'm trying to do is reduce the initramfs size used for kdump. > Kdump

Re: [systemd-devel] Thoughts about storing unit/job statistics

2019-12-02 Thread Dan Nicholson
On Thu, Nov 28, 2019 at 1:32 AM Lennart Poettering wrote: > > Ideally we wouldn't even come up with our own file format for these > ring buffers, and just use what is already established, but afaiu > there's no established standard for time series ring buffer files so > far, hence I figure we need

Re: [systemd-devel] Using systemd.offline-updates from an ostree based system

2019-04-26 Thread Dan Nicholson
On Fri, Apr 26, 2019 at 3:54 AM Lennart Poettering wrote: > > On Do, 25.04.19 17:10, Richard Hughes (hughsi...@gmail.com) wrote: > > > Hi all, > > > > I use the offline updates feature > > https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html > > in fwupd to install some k

Re: [systemd-devel] exim4 only queues mails sent by systemd service

2018-09-24 Thread Dan Nicholson
On Mon, Sep 24, 2018 at 1:38 PM Lennart Poettering wrote: > > On Mo, 24.09.18 20:34, Kamil Jońca (kjo...@o2.pl) wrote: > > > This didn't work well enough IIRC, but if it did, then it'd provide > > > almost postfix-like architecture. > > > > > > Or just making 'sendmail' send a SIGALRM to the

Re: [systemd-devel] timezone aware timers

2018-02-20 Thread Dan Nicholson
On Tue, Feb 20, 2018 at 11:04 AM, Lennart Poettering wrote: > On Di, 20.02.18 11:14, Iain Lane (i...@orangesquash.org.uk) wrote: > >> I also don't know how we'd get notified of the timezone changing. >> inotify on /etc/timezone? > > /etc/timezone is usually a symlink, and iirc we can't install ino

Re: [systemd-devel] Ordering (apt) timer services to not run at the same time

2017-04-29 Thread Dan Nicholson
On Apr 27, 2017 4:31 PM, "Julian Andres Klode" wrote: Hi systemd folks, (service and timer files being discussed at the bottom) we are currently reworking the way automatic updates and upgrades work on Ubuntu and Debian systems. We basically have two persistent timers with associated services:

Re: [systemd-devel] Preset/enable issues

2016-03-23 Thread Dan Nicholson
On Wed, 2016-03-23 at 06:21 -0700, Dan Nicholson wrote: > At Endless, we compose a system from debian packages which enable > services based on package policy. However, when we compose our whole > system, we run systemctl preset-all (in a chroot) with our preset file > to get the se

[systemd-devel] Preset/enable issues

2016-03-23 Thread Dan Nicholson
temd/system/dev-disk-by\x2dlabel-eos\x2dswap.swap. The directory is created as dev-disk-byx2dlabel-eosx2dswap.device.wants, but I'm pretty sure the x's should be escaped with \. At least, that's what the unit names do, and that's how the directories used to be named by ena