On Fri, Feb 17, 2012 at 05:58:31PM +0800, 郑文辉(Techlive Zheng) wrote: > 2012/2/17 Lukas Fleischer <archlinux@xxxxxxxxxxxxxx>: > > On Fri, Feb 17, 2012 at 05:32:33PM +0800, 大熊 wrote: > >> 在 2012年2月17日 下午2:57,Lukas Fleischer <archlinux@xxxxxxxxxxxxxx>写道: > >> > >> > On Fri, Feb 17, 2012 at 12:35:03PM +0800, 郑文辉(Techlive Zheng) wrote: > >> > > 2012/2/17 大熊 <bearsprite@xxxxxxxxx>: > >> > > > No matter I manual start any a daemon, I always see a error shown on > >> > > > console: > >> > > > > >> > > > /etc/rc.d/functions: line 506: syntax error near unexpected token `(' > >> > > > /etc/rc.d/functions: line 506: ` done < <(findmnt -mrunRo > >> > > > TARGET,FSTYPE,OPTIONS /) > >> > > > > >> > > > But it seem that the daemon can run correctly, so should I need to fix > >> > it > >> > > > and how to fix it ? > >> > > > >> > > I don't know why this bug is always occur again and again. > >> > > > >> > > The fix is to edit /etc/rc.d/functions, change line 506 to the following: > >> > > > >> > > done < $(findmnt -mrunRo TARGET,FSTYPE,OPTIONS /) > >> > > >> > Nope. Don't do that. Post the output of `bash --help | head -1`, `which > >> > bash` and `pacman -Qo /bin/bash`. > >> > > >> > >> ➜ ~ bash --help|head -1 > >> GNU bash, version 4.2.20(2)-release-(i686-pc-linux-gnu) > >> ➜ ~ which bash > >> /bin/bash > >> ➜ ~ pacman -Qo /bin/bash > >> /bin/bash is owned by bash 4.2.020-1 > >> ➜ ~ > > > > Weird... Did you enforce POSIX-compatibility somewhere? How do you start > > the daemons? Do you use something broken like `sh rc.d start $foo` or > > `sh /etc/rc.d/$foo start`? > > > > If you don't, the outputs of `pacman -Qo /etc/rc.d/functions`, `head -1 > > /etc/rc.d/functions` and `head -1 /usr/sbin/rc.d` might be helpful as > > well. > > I have the same problem.It is all happened at codes like "done < > <(some stuff)",but after I changed it to "done < $(some stuff)", all > going well.I don't know bash has such a syntax usage? "done < $(foo)" isn't the same thing as "done < <(foo)". You break scripts by changing that (see "Command Substitution" vs. "Process Substitution" in the bash(1) man page). Sounds like process substitution support is broken for you which might have occurred because a) You're not using bash (e.g. running rc.d(8) in sh(1)/$whatever). b) You built bash manually and disabled process substitution support. c) You're running bash in POSIX mode. d) Something else happened.