Find the answer to your Linux question:
Results 1 to 4 of 4

Thread: Reboot command

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    May 2005
    Location
    Chennai,TamilNadu, India
    Posts
    141

    Reboot command


    Hi all

    I have connected to a FC3 system via Putty..

    I give the reboot command such as
    Code:
    shutdown -r now
    I get the message that the system is going to reboot now..

    But the problem is even after that message the control returns to the prompt and i am able to try out some other commands before the terminal says that the connection has been lost...

    what i need is that the users should not be able to execute a single command after the reboot command is given...
    what should be done for that..?

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Try it manually:
    Code:
    init 6
    and see if that works better for you.

  3. #3
    Linux Newbie
    Join Date
    May 2005
    Location
    Chennai,TamilNadu, India
    Posts
    141
    i tried . the same result.. about 5 to 10 seconds delay. during this i am able to execute some commands via a script.
    after which i am not able to type any other command

    but i will like to cut down on that too and not letting the user execute anything

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I don't see any obvious way to do this. I mean, reboot isn't supposed to be affecting running processes and terminals. It just tells init to initiate the shutdown sequence.

    To be honest, I don't really see why you would want to do something like that, either. I cannot see the harm in having the shells run for 15 more seconds.

    If you really feel that you have to do this (for whatever reason), the only way I can see is to make a wrapper script for reboot, which kills off all sshd processes, telnetd processes and processes of what other programs you may be using to allow access before it calls the real reboot program.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •