Team,
I have a script in /etc/rc3.d this script does not work when the system is booted up or rebooted. I am able to however easily without any extra work run the script just fine after the server is rebooted.
This to me suggests something awry with the environment variables. I do have /root/.bashrc which is probably the cause of my woes.
I googled and found that things will likely work if I add the following to the shell script:
chmod a+x ~/.bashrc
PS1='$ '
source ~/.bashrc
So, will I be all good if I add these three lines prior to anything else in the bash script? Regards,
Kartik Vashishta
/etc/rc3.d startup script does not work, runs fine manually
-
- Posts: 66
- Joined: 2015/02/15 18:35:55
Re: /etc/rc3.d startup script does not work, runs fine manua
Initscripts should be in /etc/init.d/ and then set up with the correct runlevels using the chkconfig command. This requires some special comments to be added to the initscript to tell chkconfig what to do. You can see examples in all the other existing initscripts.
Without seeing your script or any error messages that get generated, no-one is going to be able to do more than guess what the problem is.
Without seeing your script or any error messages that get generated, no-one is going to be able to do more than guess what the problem is.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke