🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4750

Bug#1113769: molly-guard: Can't reboot or shutdown in a cron job

#4750
From: Marc Haber
Date: Mon, 16 Nov 2026 17:00
33 lines
2824 bytes
Control: tags -1
thanks

On Tue, Sep 02, 2025 at 11:37:49AM +0100, Ian Chard wrote:
> molly-guard fails to reboot or shutdown if I call these commands from a cron job.
> For example, if I have
> 
> 0 7 * * * /usr/sbin/reboot
> 
> in root's crontab, the reboot doesn't happen, and root gets this email:
> 
> > Subject: Cron <root@cupboard-bridge> /usr/sbin/reboot
> >
> > E: not a regular file:
> 
> Before upgrading to trixie, this worked and the reboot just happened silently.

I guess this is caused by some change in our reboot mechanisms. I am not 
sure whether it would be possible to accomodate your request without 
requiring changes to your setup.

What I suggest is:

- we extend the /etc/molly-guard/run.d/ mechanism so that a script can
  cause an immediate "pass" of the command
- we ship a run.d snipped that will issue such an immediate "pass" if 
  a certain environment variable is set or a marker file exists
- you set that environment variable in your cron job.

Would that be acceptable for you?

Greetings
Marc
Technical Details
Message-ID: <O08dI-chPl-11@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
References: <LqwU1-ce6j-7@gated-at.bofh.it> <LqwU1-ce6j-7@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
From: Marc Haber <mh+debian-packages@zugschlus.de>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1113769: molly-guard: Can't reboot or shutdown in a cron job
Date: Mon, 16 Nov 2026 18:00:02 +0100
Message-ID: <O08dI-chPl-11@gated-at.bofh.it>
References: <LqwU1-ce6j-7@gated-at.bofh.it> <LqwU1-ce6j-7@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Mon Nov 16 16:57:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.651
Reply-To: Marc Haber <mh+debian-packages@zugschlus.de>, 1113769@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: molly-guard@packages.debian.org
X-Debian-Pr-Message: followup 1113769
X-Debian-Pr-Package: molly-guard
X-Debian-Pr-Source: molly-guard
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
User-Agent: Mutt/2.4.1 (2026-07-04)
X-Crossassassin-Score: 2
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003011
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 33
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 16 Nov 2026 17:54:06 +0100
X-Original-Message-ID: <avs1Lik8bCAVVmw3@192.168.77.35>
X-Original-References: <175680946917.24450.4307587212194228871.reportbug@cupboard-bridge.ruby.chard.org> <175680946917.24450.4307587212194228871.reportbug@cupboard-bridge.ruby.chard.org>