
	mkdir -p "/var/volatile/cache";
	chown root.root /var/volatile/cache || echo "Failed to set owner -root- for -/var/volatile/cache-." >/dev/tty0 2>&1;
	chmod 0755 /var/volatile/cache || echo "Failed to set mode -0755- for -/var/volatile/cache-." >/dev/tty0 2>&1 

	mkdir -p "/var/volatile/lock";
	chown root.root /var/volatile/lock || echo "Failed to set owner -root- for -/var/volatile/lock-." >/dev/tty0 2>&1;
	chmod 1777 /var/volatile/lock || echo "Failed to set mode -1777- for -/var/volatile/lock-." >/dev/tty0 2>&1 

	mkdir -p "/var/volatile/log";
	chown root.root /var/volatile/log || echo "Failed to set owner -root- for -/var/volatile/log-." >/dev/tty0 2>&1;
	chmod 0755 /var/volatile/log || echo "Failed to set mode -0755- for -/var/volatile/log-." >/dev/tty0 2>&1 

	mkdir -p "/var/volatile/run";
	chown root.root /var/volatile/run || echo "Failed to set owner -root- for -/var/volatile/run-." >/dev/tty0 2>&1;
	chmod 0755 /var/volatile/run || echo "Failed to set mode -0755- for -/var/volatile/run-." >/dev/tty0 2>&1 

	mkdir -p "/var/volatile/tmp";
	chown root.root /var/volatile/tmp || echo "Failed to set owner -root- for -/var/volatile/tmp-." >/dev/tty0 2>&1;
	chmod 1777 /var/volatile/tmp || echo "Failed to set mode -1777- for -/var/volatile/tmp-." >/dev/tty0 2>&1 
	
	if [ -L "/var/cache" ]; then
		[ "$(readlink -f "/var/cache")" != "/var/volatile/cache" ] && { rm -f "/var/cache"; ln -sf "/var/volatile/cache" "/var/cache"; };
	elif [ -d "/var/cache" ]; then
		if awk '$2 == "/var/cache" {exit 1}' /proc/mounts; then
			cp -a /var/cache/* /var/volatile/cache 2>/dev/null;
			cp -a /var/cache/.[!.]* /var/volatile/cache 2>/dev/null;
			rm -rf "/var/cache";
			ln -sf "/var/volatile/cache" "/var/cache";
		fi
	else
		ln -sf "/var/volatile/cache" "/var/cache";
	fi
        
	
	if [ -L "/var/lock" ]; then
		[ "$(readlink -f "/var/lock")" != "/var/volatile/lock" ] && { rm -f "/var/lock"; ln -sf "/var/volatile/lock" "/var/lock"; };
	elif [ -d "/var/lock" ]; then
		if awk '$2 == "/var/lock" {exit 1}' /proc/mounts; then
			cp -a /var/lock/* /var/volatile/lock 2>/dev/null;
			cp -a /var/lock/.[!.]* /var/volatile/lock 2>/dev/null;
			rm -rf "/var/lock";
			ln -sf "/var/volatile/lock" "/var/lock";
		fi
	else
		ln -sf "/var/volatile/lock" "/var/lock";
	fi
        
	
	if [ -L "/var/log" ]; then
		[ "$(readlink -f "/var/log")" != "/var/volatile/log" ] && { rm -f "/var/log"; ln -sf "/var/volatile/log" "/var/log"; };
	elif [ -d "/var/log" ]; then
		if awk '$2 == "/var/log" {exit 1}' /proc/mounts; then
			cp -a /var/log/* /var/volatile/log 2>/dev/null;
			cp -a /var/log/.[!.]* /var/volatile/log 2>/dev/null;
			rm -rf "/var/log";
			ln -sf "/var/volatile/log" "/var/log";
		fi
	else
		ln -sf "/var/volatile/log" "/var/log";
	fi
        
	
	if [ -L "/var/run" ]; then
		[ "$(readlink -f "/var/run")" != "/var/volatile/run" ] && { rm -f "/var/run"; ln -sf "/var/volatile/run" "/var/run"; };
	elif [ -d "/var/run" ]; then
		if awk '$2 == "/var/run" {exit 1}' /proc/mounts; then
			cp -a /var/run/* /var/volatile/run 2>/dev/null;
			cp -a /var/run/.[!.]* /var/volatile/run 2>/dev/null;
			rm -rf "/var/run";
			ln -sf "/var/volatile/run" "/var/run";
		fi
	else
		ln -sf "/var/volatile/run" "/var/run";
	fi
        
	
	if [ -L "/var/tmp" ]; then
		[ "$(readlink -f "/var/tmp")" != "/var/volatile/tmp" ] && { rm -f "/var/tmp"; ln -sf "/var/volatile/tmp" "/var/tmp"; };
	elif [ -d "/var/tmp" ]; then
		if awk '$2 == "/var/tmp" {exit 1}' /proc/mounts; then
			cp -a /var/tmp/* /var/volatile/tmp 2>/dev/null;
			cp -a /var/tmp/.[!.]* /var/volatile/tmp 2>/dev/null;
			rm -rf "/var/tmp";
			ln -sf "/var/volatile/tmp" "/var/tmp";
		fi
	else
		ln -sf "/var/volatile/tmp" "/var/tmp";
	fi
        

	mkdir -p "/var/lock/subsys";
	chown root.root /var/lock/subsys || echo "Failed to set owner -root- for -/var/lock/subsys-." >/dev/tty0 2>&1;
	chmod 0755 /var/lock/subsys || echo "Failed to set mode -0755- for -/var/lock/subsys-." >/dev/tty0 2>&1 

	touch "/var/log/wtmp";
	chown root.root /var/log/wtmp || echo "Failed to set owner -root- for -/var/log/wtmp-." >/dev/tty0 2>&1;
	chmod 0664 /var/log/wtmp || echo "Failed to set mode -0664- for -/var/log/wtmp-." >/dev/tty0 2>&1 

	touch "/var/run/utmp";
	chown root.root /var/run/utmp || echo "Failed to set owner -root- for -/var/run/utmp-." >/dev/tty0 2>&1;
	chmod 0664 /var/run/utmp || echo "Failed to set mode -0664- for -/var/run/utmp-." >/dev/tty0 2>&1 

	touch "/var/log/lastlog";
	chown root.root /var/log/lastlog || echo "Failed to set owner -root- for -/var/log/lastlog-." >/dev/tty0 2>&1;
	chmod 0664 /var/log/lastlog || echo "Failed to set mode -0664- for -/var/log/lastlog-." >/dev/tty0 2>&1 

	touch "/var/log/boot";
	chown root.root /var/log/boot || echo "Failed to set owner -root- for -/var/log/boot-." >/dev/tty0 2>&1;
	chmod 0644 /var/log/boot || echo "Failed to set mode -0644- for -/var/log/boot-." >/dev/tty0 2>&1 

	mkdir -p "/var/log/samba";
	chown root.root /var/log/samba || echo "Failed to set owner -root- for -/var/log/samba-." >/dev/tty0 2>&1;
	chmod 0755 /var/log/samba || echo "Failed to set mode -0755- for -/var/log/samba-." >/dev/tty0 2>&1 

	mkdir -p "/var/run/samba";
	chown root.root /var/run/samba || echo "Failed to set owner -root- for -/var/run/samba-." >/dev/tty0 2>&1;
	chmod 0755 /var/run/samba || echo "Failed to set mode -0755- for -/var/run/samba-." >/dev/tty0 2>&1 

	mkdir -p "/var/run/autofs";
	chown root.root /var/run/autofs || echo "Failed to set owner -root- for -/var/run/autofs-." >/dev/tty0 2>&1;
	chmod 0700 /var/run/autofs || echo "Failed to set mode -0700- for -/var/run/autofs-." >/dev/tty0 2>&1 

	mkdir -p "/media/autofs";
	chown root.root /media/autofs || echo "Failed to set owner -root- for -/media/autofs-." >/dev/tty0 2>&1;
	chmod 0755 /media/autofs || echo "Failed to set mode -0755- for -/media/autofs-." >/dev/tty0 2>&1 

	mkdir -p "/var/run/dbus";
	chown messagebus.messagebus /var/run/dbus || echo "Failed to set owner -messagebus- for -/var/run/dbus-." >/dev/tty0 2>&1;
	chmod 0755 /var/run/dbus || echo "Failed to set mode -0755- for -/var/run/dbus-." >/dev/tty0 2>&1 

	mkdir -p "/var/run/sepermit";
	chown root.root /var/run/sepermit || echo "Failed to set owner -root- for -/var/run/sepermit-." >/dev/tty0 2>&1;
	chmod 0755 /var/run/sepermit || echo "Failed to set mode -0755- for -/var/run/sepermit-." >/dev/tty0 2>&1 

	mkdir -p "/var/run/vsftpd/empty";
	chown root.root /var/run/vsftpd/empty || echo "Failed to set owner -root- for -/var/run/vsftpd/empty-." >/dev/tty0 2>&1;
	chmod 0755 /var/run/vsftpd/empty || echo "Failed to set mode -0755- for -/var/run/vsftpd/empty-." >/dev/tty0 2>&1 

	mkdir -p "/var/run/wpa_supplicant";
	chown root.root /var/run/wpa_supplicant || echo "Failed to set owner -root- for -/var/run/wpa_supplicant-." >/dev/tty0 2>&1;
	chmod 0700 /var/run/wpa_supplicant || echo "Failed to set mode -0700- for -/var/run/wpa_supplicant-." >/dev/tty0 2>&1 
