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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Alternative Computing > Linux Support
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Linux Support Linux - Operating Systems and Applications Support

Reply
 
LinkBack Thread Tools
Old 09-13-2005, 10:40 AM   #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!!!"
antrieb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
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

Old 09-13-2005, 04:27 PM   #2 (permalink)
Member
 
Join Date: Sep 2005
Posts: 58
OS: Triple Booting: XP/Slacky/FreeBSD


Well, for starts what is your distro?

And I'm not sure if a shell script is fully capable of that. You may need to code it in a high level language such as C.

Also, have you tried google?
Scooped is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-13-2005, 09:05 PM   #3 (permalink)
Registered User
 
Join Date: Sep 2005
Posts: 3
OS: xp


fedora core or i could use suse.... this should not need anything that advanced. its not hard, i just cant remember it all. and i have no time to research
antrieb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-15-2005, 11:47 PM   #4 (permalink)
Tech, Networking Forums
 
Squashman's Avatar
 
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.
Squashman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-16-2005, 05:35 PM   #5 (permalink)
Member
 
Join Date: Sep 2005
Posts: 58
OS: Triple Booting: XP/Slacky/FreeBSD


Good point Squashman, I dont know what I was thinking.

I'm pretty sure FC and suse use grub.
Scooped is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 09-16-2005, 09:39 PM   #6 (permalink)
Registered User
 
Join Date: Sep 2005
Posts: 3
OS: xp


hm... worked.. i guess i should of just did that in the first place, when he asked me to make it i didn't even think that there was more then one way to skin a cat... thanks !!!
antrieb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 02:02 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85