Re: [systemd-devel] [PATCH] TODO: add molly-guard functionality

2014-08-25 Thread Lennart Poettering
On Sat, 23.08.14 19:26, Josh Triplett (j...@joshtriplett.org) wrote:

 Rather than requiring a third-party tool for this, systemctl should
 handle this natively.

This has been proposed before, but I sounds awfully random to me to have
in systemd. I am pretty sure this should be an add-on, but not
something we should support out-of-the-box.

Sorry,

 @@ -441,6 +441,7 @@ Features:
- Something is wrong with symlink handling of autovt@.service in 
 systemctl list-unit-files
- better error message if you run systemctl without systemd running
- systemctl status output should should include list of triggering units 
 and their status
 +  - add molly-guard functionality: prompt for hostname if interactively 
 shutting down a remote system (running as child of ssh)
  
  * unit install:
- systemctl mask should find all names by which a unit is accessible

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] TODO: add molly-guard functionality

2014-08-25 Thread Josh Triplett
On Mon, Aug 25, 2014 at 07:19:47PM +0200, Lennart Poettering wrote:
 On Sat, 23.08.14 19:26, Josh Triplett (j...@joshtriplett.org) wrote:
 
  Rather than requiring a third-party tool for this, systemctl should
  handle this natively.
 
 This has been proposed before, but I sounds awfully random to me to have
 in systemd. I am pretty sure this should be an add-on, but not
 something we should support out-of-the-box.

I wouldn't argue that it's something we should *enable* by default, just
something to have available and enableable (perhaps via system.conf).

Related to that, would you be willing to take patches for separate tiny
binaries for shutdown/poweroff/etc, so that they don't depend on argv[0]
to decide what to do?  That would make it easier to do things like
diverting /sbin/poweroff to /sbin/poweroff.real and putting a wrapper in
/sbin/poweroff.

- Josh Triplett
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] TODO: add molly-guard functionality

2014-08-24 Thread Tobias Geerinckx-Rice
On 24 August 2014 04:26, Josh Triplett j...@joshtriplett.org wrote:
 +  - add molly-guard functionality: prompt for hostname if interactively 
 shutting down a remote system (running as child of ssh)

I'll assume (and hope) that both the hostname prompt and SSH child
rule are merely example configurations of a more generic system. SSH
is far from the only possible use-case, and hostnames aren't always
that relevant.

Which makes me wonder whether this can't already be done today, with
some simple Requires/ExecStart{,Pre}/... snippets on shutdown.target.
These could even be shipped by default, pointing to some empty
systemd/shutdown.d directory.

(Now, that still sounds quite dirty, and leaves an unpleasant SysV
aftertaste; but it's a lot better than hard-coding this [*if* that's
what anyone is contemplating. Perhaps I'm being paranoid, but I never
know when adding another --disable- switch to ./configure will finally
return E2BIG...])

Regards,

T G-R
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] TODO: add molly-guard functionality

2014-08-23 Thread Josh Triplett
Rather than requiring a third-party tool for this, systemctl should
handle this natively.
---
 TODO | 1 +
 1 file changed, 1 insertion(+)

diff --git a/TODO b/TODO
index 0fcd3a0..aaf6444 100644
--- a/TODO
+++ b/TODO
@@ -441,6 +441,7 @@ Features:
   - Something is wrong with symlink handling of autovt@.service in 
systemctl list-unit-files
   - better error message if you run systemctl without systemd running
   - systemctl status output should should include list of triggering units and 
their status
+  - add molly-guard functionality: prompt for hostname if interactively 
shutting down a remote system (running as child of ssh)
 
 * unit install:
   - systemctl mask should find all names by which a unit is accessible
-- 
2.1.0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel