> >> Anyway, I would like to have the system confirm a shutdown or reboot
> >> before actually doing it.
> 
> >Why?
> >And who will be allowed to initiate a shutdown that way?
> 
> >Without knowing that, it's hard to suggest a sane approach.
> 
> I was just thinking about the possibility of having more than one SSH
> session open, and mistakenly shutting down the wrong one.  I agree that this
> should be unlikely to occur, but I wanted to see if I could devise a simply
> second step to help prevent it.

If you miss the first step of realizing which machine you are
actually shutting down, no second step is gonna do that for you.

> So, it seems to me that rc.shutdown could be used in this way, as long as I
> could reliably figure out a way to redirect input/output to whatever
> terminal was used to start the shutdown process.  I can think of a pretty
> messy way to do this by parsing through the output of ps, but thought there
> must be a better way.

If rc.shutdown is in progress, someone who has the priviledge
already said shutdown(8). What's there to "confirm"?

Reply via email to