Ik kwam vanochtend het volgende wazige tegen:
Met andere woorden: in /etc staat een symlink 'nagios' naar /etc/shared/nagios. In /etc bevindt zich ook het bestand 'nrpe.local.cfg'. Vanuit de directory /etc/nagios kan ls niet bij ../nrpe.cfg, omdat hij die zoekt in /etc/shared/nagios/../nrpe.local.cfg'. Bash vindt hem echter wel, want vanuit /etc/nagios werkt tab-completion wel. De $PWD staat op dat moment ook goed:
Heeft iemand enig idee of dit 'by design' is, of dat een bug is, en zoja: waar? Waarom vindt bash wel dat ../nrpe.local.cfg bestaat, terwijl elke willekeurige applicatie (ls, cat ...) het bestand niet ziet.
Extra info:
Distro: Debian Sarge
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
| office1:/etc# ls -ld nagios lrwxrwxrwx 1 root root 19 2006-05-24 17:14 nagios -> /etc/shared/nagios/ office1:/etc# ls -l nrpe.local.cfg -rw-r----- 1 nagios root 193 2006-06-15 16:48 nrpe.local.cfg office1:/etc# cd nagios office1:/etc/nagios# cat ../nrpe.local.cfg cat: ../nrpe.local.cfg: No such file or directory office1:/etc/nagios# cat /etc/nrpe.local.cfg command[check_blaat]=/usr/lib/nagios/plugins/check_blaat |
Met andere woorden: in /etc staat een symlink 'nagios' naar /etc/shared/nagios. In /etc bevindt zich ook het bestand 'nrpe.local.cfg'. Vanuit de directory /etc/nagios kan ls niet bij ../nrpe.cfg, omdat hij die zoekt in /etc/shared/nagios/../nrpe.local.cfg'. Bash vindt hem echter wel, want vanuit /etc/nagios werkt tab-completion wel. De $PWD staat op dat moment ook goed:
code:
1
2
| office1:/etc/nagios# echo $PWD /etc/nagios |
Heeft iemand enig idee of dit 'by design' is, of dat een bug is, en zoja: waar? Waarom vindt bash wel dat ../nrpe.local.cfg bestaat, terwijl elke willekeurige applicatie (ls, cat ...) het bestand niet ziet.
Extra info:
Distro: Debian Sarge
code:
1
2
| office1:/etc/nagios# bash --version GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu) |
[ Voor 3% gewijzigd door Gertjan op 19-06-2006 10:19 ]