LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 07:11 AM   #1
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
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, 07: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: 67
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, 07:21 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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, 07: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: 67
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, 07:49 AM   #5
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Original Poster
Rep: Reputation: 44
the device is ath0, why can't i just tell it to run dhclient?
 
Old 01-02-2008, 07:53 AM   #6
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Original Poster
Rep: Reputation: 44
could i just add gdm and dhclient to /etc/rc.d/rc.local ?
 
Old 01-02-2008, 07: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: 67
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 07:56 AM.
 
Old 01-02-2008, 08:10 AM   #8
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Original Poster
Rep: Reputation: 44
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, 08:13 AM   #9
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Original Poster
Rep: Reputation: 44
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



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 08:28 PM
Commands executed at boot time Johnburrell Linux From Scratch 3 09-18-2005 01:56 PM
Automating modprobe commands rosspet Linux - Networking 4 08-06-2005 01:09 PM
Automating simple commands, scripting or programming? entob *BSD 3 09-01-2004 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:03 PM.

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
Open Source Consulting | Domain Registration