tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Creating /var/shm as a symlink during startup



On Fri, Nov 06, 2015 at 08:31:20PM +0100, Martin Husemann wrote:
> Index: etc/rc.d/cleartmp
> ===================================================================
> RCS file: /cvsroot/src/etc/rc.d/cleartmp,v
> retrieving revision 1.12
> diff -u -r1.12 cleartmp
> --- etc/rc.d/cleartmp	3 Jul 2015 18:36:54 -0000	1.12
> +++ etc/rc.d/cleartmp	6 Nov 2015 19:26:40 -0000
> @@ -45,6 +45,14 @@
>  	(cd ${tmp_dir} &&
>  	    find -x . ! -name . ! -name lost+found ! -name quota.user \
>  		! -name quota.group -exec rm -rf -- {} \+ -type d -prune)
> +
> +	# if requested, create symlink for /var/shm
> +	if [ -n "${var_shm_symlink}" ]; then
> +		rm -rf /var/shm
> +		mkdir -p "${var_shm_symlink}"
> +		chmod 1777 "${var_shm_symlink}"
> +		ln -s "${var_shm_symlink}" /var/shm
> +	fi
>  }
>  
>  load_rc_config $name

mkdir -m ? I think it would also be a good idea to remove it first.

Joerg


Home | Main Index | Thread Index | Old Index