#! /bin/sh ### BEGIN INIT INFO # Provides: mount-overlay # Required-Start: mountall-bootclean # Required-Stop: # Default-Start: S # Default-Stop: # X-Start-Before: procps udev-mtab urandom # Short-Description: overlay mode # Descrition: Shutdown process will not be required ### END INIT INFO /bin/mount /boot cd /boot file=nofsprotect if [ -e ${file} ]; then exit 0 fi /bin/mount -t tmpfs tmpfs /fsprotect for d in etc home root var usr opt do mkdir /fsprotect/${d} mkdir /fsprotect/${d}_rw OPTS="-o lowerdir=/${d},upperdir=/fsprotect/${d},workdir=/fsprotect/${d}_rw" /bin/mount -t overlay ${OPTS} overlay /${d} done exit 0