0

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 "DaniWeb!!!"

2
Contributors
1
Reply
3
Views
12 Years
Discussion Span
Last Post by shanenin
0

writing a shell script that would ask these questions would be easy. The problem is getting this script to run before entering any runlevel. The very first thing the program init does is checks the file /etc/inittab to see what runlevel to choose. I am not sure how you would get a script to do this first.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.