Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame^] | 1 | #!/bin/sh |
2 | # This script is intended to be used sorely by overlayfs-create-dirs.service | ||||
3 | # Usage: overlayfs-create-dirs.sh <LOWERDIR> <DATA_MOUNT_POINT> | ||||
4 | |||||
5 | lowerdir=$1 | ||||
6 | datamountpoint=$2 | ||||
7 | mkdir -p ${datamountpoint}/upper${lowerdir} | ||||
8 | mkdir -p ${datamountpoint}/workdir${lowerdir} | ||||
9 | if [ -d "$lowerdir" ]; then | ||||
10 | chown $(stat -c "%U:%G" ${lowerdir}) ${datamountpoint}/upper${lowerdir} | ||||
11 | fi |