> This is *WRONG*, it will also return 0 if /tmp is not a symlink.

Wow, my bad, sorry for the noise.  Should not have really mixed C and
shell code in my head.

> (Also, use test -h instead of test -L for symlinks, cf. the
> GNU autoconf texinfo manual, *Limitations of Builtins::)
>
> What about this instead:
>
>       if test -h /tmp; then
>               # symbolic link
>               # will be created by mount_tmp if it does not exist
>               test -d /tmp || return 0
>               # but we’ll clean it if it does
>       fi

Indeed your version is better.  (Although as a minor nitpick
bootclean.sh uses [ and -L in other places, so it will look inconsistent)

Reply via email to