[systemd-devel] systemctl status not showing still running processes in inactive .mount unit cgroups (NFS specifically)

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jan 15 04:40:58 PST 2015


On 15/01/15 09:28, Colin Guthrie wrote:
> Although if the script is in bash I'd use  "if [ -d ..." rather than "if
> test -d ..." as (and bash experts (Harald?) can correct me here if I'm
> wrong) I believe [ is a bash built in (even if it is a binary in
> /usr/bin/), whereas it would have to fork out to run "test".

bash, dash, zsh and busybox sh all have both "test" and "[" as builtins,
at least as they're configured on Debian (and presumably Ubuntu too). No
idea about more obscure shells like ksh, but there's really no good
reason to implement one and not the other.

GNU coreutils provides /usr/bin/test and /usr/bin/[ as a fallback, but
they'd rarely be used.

Here's how you tell:

smcv at archetype:~$ type [
[ is a shell builtin
smcv at archetype:~$ type test
test is a shell builtin
smcv at archetype:~$ type dd       # a random non-builtin for comparison
dd is /bin/dd

    S



More information about the systemd-devel mailing list