LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-02-2008, 08:11 AM   #1
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Rep: Reputation: 39
Exclamation automating standard commands at boot time


i have a system with 256MB RAM, i installed FC6 on it and it doesnt boot into a GUI, Gnome runs if you type startx, it also has an atheros wireless card which isn't recignised by the network manager so i have to type dhclient to access the net, is there any way to make these commands happen automatically on boot before you login? if so i would replace starx with gdm and login graphically i just find it annoying to have to write in these two commands every time i boot that system
 
Old 01-02-2008, 08:17 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
If you look at /etc/inittab what is the default runlevel?

You should see something like this in the file: "id:5:initdefault:". That line would indicate that the default runlevel is level 5.

For RedHat/Fedora the default run levels are the following:

0 - halt (Do NOT set initdefault to this)
1 - Single user mode
2 - Multiuser, without NFS (The same as 3, if you do not have networking)
3 - Full multiuser mode (likely what your set to know... starts everything but x)
4 - unused
5 - X11 (What you want if you want graphical login and X started automatically)
6 - reboot (Do NOT set initdefault to this)
 
Old 01-02-2008, 08:21 AM   #3
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
To boot into a GUI by default, edit /etc/inittab and change
Code:
 id:3:initdefault:
to
Code:
 id:5:initdefault:
As for dhclient, you can add the command to /etc/rc.d/rc.local and it will be run at boot time.
 
Old 01-02-2008, 08:43 AM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
Quote:
Originally Posted by reddazz View Post
As for dhclient, you can add the command to /etc/rc.d/rc.local and it will be run at boot time.
You may want to look into /etc/sysconfig/network-scripts/ifcfg-ethX (where X is the correct number for the device. If you set BOOTPROTO=dhcp and ONBOOT=yes then you should get the desired effect of dhcp on bootup.
 
Old 01-02-2008, 08:49 AM   #5
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Original Poster
Rep: Reputation: 39
the device is ath0, why can't i just tell it to run dhclient?
 
Old 01-02-2008, 08:53 AM   #6
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Original Poster
Rep: Reputation: 39
could i just add gdm and dhclient to /etc/rc.d/rc.local ?
 
Old 01-02-2008, 08:55 AM   #7
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
Is there an /etc/sysconfig/network-scripts/ifcfg-ath0 file? If not, create one that looks like this:

Code:
DEVICE=ath0
ONBOOT=yes
BOOTPROTO=dhcp
That is the "redhat way" of configuring network devices and will cause it to run dhclient on boot.

The /etc/sysconfig/network-scripts files are the files used by the RedHat network service script.

Last edited by jtshaw; 01-02-2008 at 08:56 AM.
 
Old 01-02-2008, 09:10 AM   #8
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Original Poster
Rep: Reputation: 39
i'll look into all those options, i don't have access to the system currently, it's my dads n he gets a bit iffy with me changing things :P i have no idea why (3 burnt out P4 chips :S)
 
Old 01-02-2008, 09:13 AM   #9
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Original Poster
Rep: Reputation: 39
thankyou all for your suggestions, i'll look into all of them, i don't currently have access to the system as it's my dads, he gets a bit iffy with me changing things :P i have no idea why... i only burnt out 3 P4 chips :S
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Standard time to military time newuser455 General 6 12-07-2005 09:28 PM
Commands executed at boot time Johnburrell Linux From Scratch 3 09-18-2005 02:56 PM
Automating modprobe commands rosspet Linux - Networking 4 08-06-2005 02:09 PM
Automating simple commands, scripting or programming? entob *BSD 3 09-01-2004 02:56 AM


All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration