Hot Downloads

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Startup Script help

Startup Script help 11 years 10 months ago #6769

  • jacko0
  • jacko0's Avatar
  • Offline
  • Frequent Member
  • Posts: 45
  • Karma: 0
Hi,
I need to run a command when my Redhat 9 boots.

I have no idea where to put it!

I think it might be somthing to do with a file called RC, but there are lots of rc files!

Can anyone help

Thanks

Jacko
The administrator has disabled public write access.

Re: Startup Script help 11 years 10 months ago #6773

  • nske
  • nske's Avatar
  • Offline
  • Expert Member
  • Posts: 613
  • Karma: 0
place it in /etc/rc.local and verify there is a link for it in /etc/rc3.d

(i.e. ls -o /etc/rc3.d/|grep rc.local)
The administrator has disabled public write access.

Re: Startup Script help 11 years 10 months ago #6857

  • jacko0
  • jacko0's Avatar
  • Offline
  • Frequent Member
  • Posts: 45
  • Karma: 0
Hi
Thanks for the help, i put it in /etc/rc.local and now it works!

But why would i want to put a link in /etc/rc3.d ?
The administrator has disabled public write access.

Re: Startup Script help 11 years 10 months ago #6861

  • nske
  • nske's Avatar
  • Offline
  • Expert Member
  • Posts: 613
  • Karma: 0
Because everything that exists on /etc/rcX.d is being executed upon entering the X runlevel (according to some parameteres that come from the filename, S for start, K for stop, and the number that represents the relative execution sequence). Thus if there was not a link for rc.local in rc3.d then it wouldn't be executed upon entering runlevel 3 (which I think is the default - multiuser mode for redhat).

This is the SysV type of startup script management that redhat uses, I personally find more straitforward the bsd type. :)
The administrator has disabled public write access.

Re: Startup Script help 11 years 10 months ago #6879

  • jacko0
  • jacko0's Avatar
  • Offline
  • Frequent Member
  • Posts: 45
  • Karma: 0
This is my rc.local and I have not modified any other rc.x files.

Are you sure i need to modify the other rc.x files???

thanks

Jacko


[root@mrgreedy etc]# more rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
echo " "
echo "Starting Teamspeak Deamon"
echo " "
cd /home/tsuser/tss2_rc2/
./teamspeak2-server_startscript start
The administrator has disabled public write access.

Re: Startup Script help 11 years 10 months ago #6881

  • nske
  • nske's Avatar
  • Offline
  • Expert Member
  • Posts: 613
  • Karma: 0
I didn't say you need to modify, only to verify that a link for rc.local exists in the proper place (most likely /etc/rc3.d). Since you said it works, it propably exists, so you don't have to do anything else. :)
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.081 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup