in reply to Re^2: Net-SSH-Expect & Fedora-18
in thread Net-SSH-Expect & Fedora-18

Shutdown would not be an option

The reboot command has no option for a delay, but there is a reboot option for the shutdown command, which also has a delay option.

shutdown -t 10 -r

will start a reboot after a 10 second delay. That should be plenty of time for the SSH session to end and the connection to close.

Replies are listed 'Best First'.
Re^4: Net-SSH-Expect & Fedora-18
by hardy004 (Novice) on Jul 02, 2014 at 20:41 UTC

    Thanks for your reply. Yes shutdown with -r option works

    However, looks like on Fedora-18, there is no option to configure the time in seconds.

    If i try shutdown -t 10 -r, it still reboots after the default time interval of 10secs as specified in shutdown man page.

    Do you have any recommendations on how to configure the shutdown time in seconds ?

        Hi Thanks. Below is the message i get after issues the shutdown command.

        shutdown -t 5 -r

        Broadcast message from ---- (Wed 2014-07-02 15:11:32 PDT):

        The system is going down for reboot at Wed 2014-07-02 15:12:33 PDT

        As you see, there is a default delay of 1min added before shutdown is initiated & this stays same no matter what -t option we specify.