Article View: pl.comp.os.linux
Article #908260Re: Wykonanie skryptu na resume
From: 🇵🇱Jacek Marcin Jaworski🇵🇱
Date: Thu, 17 Jul 2025 09:38
Date: Thu, 17 Jul 2025 09:38
29 lines
2434 bytes
2434 bytes
W dniu 17.07.2025 o 09:23, Jacek pisze: > Trzeba zrestartować zegar po każdym sleep. No to se wystrugałem taki > skrypt: > [...] > Nadałem nazwę i umieściłem w > /usr/lib/pm-utils/sleep.d/00restart_timedatectl, nadałem też prawa do > wykonania. I co? Kicha, nie działa. Ma ktoś pomysł dlaczego? Czy chodzi o sleep czy o suspend? Jeśli o suspend, to trzeba użyć systemd, cytat: "Immediately before entering system suspend and/or hibernation systemd-suspend.service (and the other mentioned units, respectively) will run all executables in /usr/lib/systemd/system-sleep/ and pass two arguments to them. The first argument will be "pre", the second either "suspend", "hibernate", "hybrid-sleep", or "suspend-then-hibernate" depending on the chosen action. An environment variable called "SYSTEMD_SLEEP_ACTION" will be set and contain the sleep action that is processing. This is primarily helpful for "suspend-then-hibernate" where the value of the variable will be "suspend", "hibernate", or "suspend-after-failed-hibernate" in cases where hibernation has failed. Immediately after leaving system suspend and/or hibernation the same executables are run, but the first argument is now "post". All executables in this directory are executed in parallel, and execution of the action is not continued until all executables have finished. Note that user.slice will be frozen while the executables are running, so they should not attempt to communicate with any user services expecting a reply." źródło: <https://man.archlinux.org/man/systemd-sleep.8>
Technical Details
Message-ID:
<mdrul9F3sf7U1@mid.individual.net>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<105a8du$16ntd$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: 🇵🇱Jacek Marcin Jaworski🇵🇱 <jaworski1978@adres.pl> Newsgroups: pl.comp.os.linux Subject: Re: Wykonanie skryptu na resume Date: Thu, 17 Jul 2025 11:38:49 +0200 Organization: Energo Kod Lines: 29 Message-ID: <mdrul9F3sf7U1@mid.individual.net> References: <105a8du$16ntd$1@dont-email.me> Mime-Version: 1.0 X-Trace: individual.net fF/PaKvWMM92SRjFdQwp7AsRKB/heKDf5s56AfcxDngC7dFFcH Cancel-Lock: sha1:toYPdV9ZGofMS8ETZGVQrqRqQIc= sha256:cmJt7quQLWeuQGUe0LCH4kP5ZsxTXP6m1hwCnP7O2uQ= User-Agent: Mozilla Thunderbird In-Reply-To: <105a8du$16ntd$1@dont-email.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit