slitaz-boot-scripts rev 338

/etc/init.d/rcS: tazpkg does not support /var/run symlink
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 26 15:37:00 2013 +0000 (2013-11-26)
parents 594c8dcd67de
children f2a23e182b9b
files etc/init.d/rcS
line diff
     1.1 --- a/etc/init.d/rcS	Sun Nov 24 12:09:50 2013 +0000
     1.2 +++ b/etc/init.d/rcS	Tue Nov 26 15:37:00 2013 +0000
     1.3 @@ -90,13 +90,11 @@
     1.4  done
     1.5  status
     1.6  
     1.7 -# Clean up the system and set up tmp dirs. Since we mount /run as tmpfs
     1.8 -# and have a symlink for /var/run we should have empty directories. But,
     1.9 -# some packages may overwrite the link, so make sure we have it.
    1.10 +# Clean up the system and set up tmp dirs.
    1.11  if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then
    1.12  	echo -n "Cleaning up the system..."
    1.13 -	rm -rf /tmp /var/run && ln -s /run /var/run
    1.14 -	mkdir -p /tmp/.X11-unix /tmp/.ICE-unix /run/dbus
    1.15 +	rm -rf /tmp /var/run /run
    1.16 +	mkdir -p /tmp/.X11-unix /tmp/.ICE-unix /run/dbus /var/run
    1.17  	chmod -R 1777 /tmp
    1.18  	status
    1.19  else
    1.20 @@ -208,6 +206,8 @@
    1.21  	if [ ! -s /run/boot.log ]; then
    1.22  		# Mount /run as tmpfs runtime data are not written to disk
    1.23  		mount -t tmpfs tmpfs /run
    1.24 +		# cp -a in tazpkg does not support /var/run symlink
    1.25 +		mount --bind /run /var/run
    1.26  	fi
    1.27  	/etc/init.d/rcS readonly 2>&1 | tee -a /run/boot.log
    1.28  	# Logrotate boot.log