| | 310 | |
| | 311 | == 2010-07-31 == |
| | 312 | |
| | 313 | * 仔細去追原因應該是出在 hadoop-config.sh 的第 36 行 |
| | 314 | {{{ |
| | 315 | jazz@lenny:~$ sudo /etc/rc2.d/S20hadoop-0.20-namenode start |
| | 316 | /usr/lib/hadoop-0.20/bin/hadoop-config.sh: line 36: cd: ../init.d: No such file or directory |
| | 317 | }}} |
| | 318 | {{{ |
| | 319 | #!diff |
| | 320 | --- hadoop-config.sh.org 2010-08-22 16:55:13.000000000 +0800 |
| | 321 | +++ hadoop-config.sh 2010-08-22 16:55:43.000000000 +0800 |
| | 322 | @@ -21,13 +21,7 @@ |
| | 323 | |
| | 324 | this="$0" |
| | 325 | while [ -h "$this" ]; do |
| | 326 | - ls=`ls -ld "$this"` |
| | 327 | - link=`expr "$ls" : '.*-> \(.*\)$'` |
| | 328 | - if expr "$link" : '.*/.*' > /dev/null; then |
| | 329 | - this="$link" |
| | 330 | - else |
| | 331 | - this=`dirname "$this"`/"$link" |
| | 332 | - fi |
| | 333 | + this=`readlink -f $this` |
| | 334 | done |
| | 335 | |
| | 336 | # convert relative path to absolute path |
| | 337 | }}} |