Basically I have to ask two questions through this explanation.
I am using Red Hat Linux 6.0 ... using davinchi board. I have to change system clock resolution so I am changing HZ
env var. For this I have written script so that I can change HZ = 1000
and insert that script in /etc/profile.d
and write code for loop in /etc/profile
(as it was not there) so that while running as usual /etc/profile
can load the scripts present in /etc/profile.d
. But when I am logging into the system at root level then this error is shown -bash: ./etc/profile.d/resolution.sh(my script name): No such file or directory
Question 1: Why it is showing
./etc
and not/etc
. Is something related to that??Question 2: I tried to add script in
/etc/init.d
but still no change in value ofHZ
takes place globally but it is getting reflected in home onle means~/.bash_profile.swo
but when I am doing export not getting reflected why so as changes done in/etc/profile
should be reflected all over system or did I understand something wrong?
The script (resolution.sh
) written has:
#!/bin/bash
export HZ=1000
---------------------------------------------
The content of /etc/profile which I entered is:
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
.$i
fi
done
unset i
fi
And the output of grep
command is
-rw-r--r-- 1 root root 535 Feb 4 2004 profile
-rwxr-xr-x 2 root root 4096 Feb 2 2004 profile.d