unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Unstable Horse via <help-guix@gnu.org>
To: help-guix@gnu.org
Subject: How to run a script on system shutdown/reboot
Date: Wed, 21 Jun 2023 14:16:50 +0200	[thread overview]
Message-ID: <0dde05f2e018ed6c1ca6fbfc31bbcb53458c9460.camel@unstable.horse> (raw)

Good day, people. I am browsing the shepherd's info docs, and I can't
seem to find a way to run something right after either reboot, or halt
were invoked.

Something that is usually achieved by sticking a script into /etc/rc0.d
in classical init systems, or /usr/lib/systemd/system-shutdown in
systemd.

Can I somehow configure this from my system-wide config.scm? Or any way
at all, if that's not an option?

My particular use-case is unloading a faulty kernel module, that
prevents powering off the laptop right before shepherd actually tries
to shut it down.


             reply	other threads:[~2023-06-25  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21 12:16 Unstable Horse via [this message]
2023-07-01  9:24 ` How to run a script on system shutdown/reboot James Thomas
2023-07-01 10:09   ` Unstable Horse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0dde05f2e018ed6c1ca6fbfc31bbcb53458c9460.camel@unstable.horse \
    --to=help-guix@gnu.org \
    --cc=stable.master@unstable.horse \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).