Find the answer to your Linux question:
Results 1 to 2 of 2
-------------------------------------------------------------------------------- I need to create a shell script that controls the users runlevel at every startup/logon of the linux system. the user should be prompted with a menu screen taht ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2005
    Posts
    1

    Shell Script HELP


    --------------------------------------------------------------------------------
    I need to create a shell script that controls the users runlevel at every startup/logon of the linux system. the user should be prompted with a menu screen taht asks for their desired runlevel. The user should be presented with the following 3 choices:
    Single User Mode
    Full/Extended Multi-User Mode
    Graphical/XII Mode
    The user should be "started up" in any one of these modes based on their "numerical" reponse. In addition there are certain runlevels that shouldn't be used. the script should also provide for the condition that the user might "erroneously" respond with these unsafe runlevels. In such cases the script should prevent the system from entering these runlevels & instead give a message like "Invalid Choice, Try Again!"
    ------------------------------------------------------------
    Now I'm sure their is a shell scripting guy who can whip this up in a few minutes. And thats exactly what I'm looking for. I need this done for him by tommorow. I really hope comming to these forums was the right choice becuase I'll be screwed if I can not figure this out.

    Thanks in advance

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Instead of spending time writing a script to do this, why not just let grub pass a runlevel parameter to the kernel? (I am assuming you're using grub.)

    Which distro are you referring to?

Posting Permissions

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