Bug#915671: symlinking /tmp to /run/tmp does not work
Serge Belyshev
belyshev at depni.sinp.msu.ru
Thu Dec 6 03:45:43 GMT 2018
> 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)
More information about the Debian-init-diversity
mailing list