Find the answer to your Linux question:
Results 1 to 2 of 2
In Fedora, I've created an account to manipulate ip information, and nothing else, with the following addition to the .bash_profile: "stty intr undef sudo /usr/sbin/system-config-network-tui logout" However, I noticed that ...
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    1

    How do I prevent breaking out of a script during login?

    In Fedora, I've created an account to manipulate ip information, and nothing else, with the following addition to the .bash_profile:

    "stty intr undef
    sudo /usr/sbin/system-config-network-tui
    logout"

    However, I noticed that if I hit control-c early enough after the login prompt, I can still break out. Is there any way to prevent breaking out of this? Or perhaps an entirely different, better method?

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    You can trap controle-c with:

    Code:
    trap "" SIGINT
    in your .bash_profile.

    Check the manpage of trap.

    Regards

Posting Permissions

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