![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Linux Support Linux - Operating Systems and Applications Support |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Sep 2005
Posts: 3
OS: xp
|
Shell Script Problem
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. THankx "Tech Support Forums!!!" |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#4 (permalink) |
|
Tech, Networking Forums
Join Date: Apr 2005
Location: 1265 Lombardi Ave.
Posts: 1,148
OS: All of the above
|
It is not possible to do it with a shell script. Your shell script can't run until the computer is booted up. Are you using Grub or Lilo.
If you are running Lilo, at the boot prompt you can just type the boot label and the runlevel you want to go to. So if you wanted to go into runlevel three you would type: linux 3. You can edit the /boot/message file to display what the users can type at the Lilo prompt. YOu could also edit your lilo.conf file to create new labels so you could have them type a more descriptive label. For example, if you wanted them to go into X server, you could create an entry in your lilo.conf file with the label X. Then they could just type X at the lilo prompt. Last edited by Squashman; 09-16-2005 at 12:16 AM. |
|
|
|
![]() |
| Thread Tools | |
|
|