11-05-2002 03:41 AM
I'm trying to put this simple script in /etc/init.d/ and link it under /etc/rc3.d/ in order to be run after each reboot.
When i try to execute it i have the error:
: bad interpreter: no such file or directory
It's very strange, because if i copy and paste all the lines of the script it works.
I attach the script
11-05-2002 01:50 PM
Try to change the first line accordingly (either /bin/sh or /usr/bin/bash).
Another point : some distributions pre-install the "sysctl" software that can be used for what you are trying to achieve. To use this feature :
=> Check that sysctl is installed (/etc/sysctl.conf should exist)
=> Check that sysctl is invoked at system boot-up (grep -rli sysctl /etc/rc.d)
=> Edit /etc/sysctl.conf as follows :
kernel.sem = 250 32000 32 128
kernel.shmmax = 2147483648
=> To apply changes, type : sysctl -p. You can also reboot, as this will be automatically done at every reboot.
11-05-2002 11:21 PM
The problem is nowhere related to Kernel paramters mentioned. But due to the unwanted control characters present in the script. Do this to remove the control characters from your
#chmod +x your_script
Execute the script and the error will not appear.
11-12-2002 09:38 AM
To set up these kernel sysctl's you don't need to write up a script - assuming that you're running RedHat >= 6.2.
Instead, modify /etc/sysctl.conf and add the lines:
sys.kernel.sem = "250 32000 32 128"
sys.kernel.shmmax = 2147483648
After adding these lines, they will tune these parameters in each reboot - no scripts neccessary.
11-12-2002 09:43 AM