Bug#915671: symlinking /tmp to /run/tmp does not work

Thorsten Glaser t.glaser at tarent.de
Wed Dec 5 21:40:32 GMT 2018


On Wed, 5 Dec 2018, Serge Belyshev wrote:

>  clean_tmp() {
> +	# Will be created by mount_tmp()
> +	[ -L /tmp ] && [ -d /tmp ] || return 0

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

(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

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg




More information about the Debian-init-diversity mailing list