From nobody Thu May 04 18:12:21 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC23G6PLkz49NQm for ; Thu, 4 May 2023 18:12:26 +0000 (UTC) (envelope-from jo@bruelltuete.com) Received: from email.jo-t.de (seppel.jo-t.de [45.132.244.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC23G4SLvz4DJy for ; Thu, 4 May 2023 18:12:26 +0000 (UTC) (envelope-from jo@bruelltuete.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bruelltuete.com; s=bruelltuete18a; t=1683223945; bh=dS/Y+2v5MyBtFcjd9KcxAtZeGuSbJmT1w+VviKozcjU=; h=Message-ID:Date:MIME-Version:Subject:To:References:From:From; b=VU7p3kSEbTUts2SxQbPd3BXpnHeEKnebzMuUabaxp5vOMMUCigcRd5CvVcb7BkGNL Y3cFtRykgI1zgbtzpkFVkqMMLONkdGEQJgQQFxCaAnyQmbtRZAKEO0pCmMpSfcoHv5 AICDSbE4+8E66pGEGnXQiaJJup7Y8VmhyopfBk7VQgS/Yzi/ixbDzbn+bXX/ugEzqu a3za20TyLzHGoCeFiHyzN/GyF7a1zndKfgQJswqyPaiJjxvWOj+Ye7fpYiwIPc7eZa GbDnviOrFmDFRzXRmtHrmBbqxxQ3Gs0MO55JMkSPyRmebYUxrwJtptZ4ADkl8yTl+9 mougbPr40zj/g== Message-ID: <07e1f6fe-baf6-a19d-7365-db75c245341a@bruelltuete.com> Date: Thu, 4 May 2023 19:12:21 +0100 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Subject: Re: Run scripts from rc.suspend Content-Language: en-GB To: Eugene Grosbein , freebsd-hackers@FreeBSD.org References: <256af1c8-7272-746f-35ea-0b1f94c2a40c@bruelltuete.com> <29e0a1a0-7807-a0f0-05b4-8e36385b8bc6@grosbein.net> From: Johannes Totz In-Reply-To: <29e0a1a0-7807-a0f0-05b4-8e36385b8bc6@grosbein.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QC23G4SLvz4DJy X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:197540, ipnet:45.132.244.0/22, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 04/05/2023 16:59, Eugene Grosbein wrote: > 04.05.2023 21:37, Johannes Totz wrote: >> Hi everyone, >> >> /etc/rc.resume can run rc-scripts with the resume keyword. >> /etc/rc.suspend does not have a similar feature. >> Is there a good reason why not? Or is it just a case of nobody-asked-for-it-yet? > > The latter. Quick hack: https://reviews.freebsd.org/D39965 Works as intended. I would use this as follows: I'm done for the day, press sleep button on my workstation. A new rc.suspend-script runs and sets a wake up time for the next morning. Then the next day the machine wakes up again, runs its cron jobs or whatever and is ready when I'm ready.