blob: 9954c343521b5a180963d15066683d68600fec59 [file] [log] [blame]
Andrew Geissler78b72792022-06-14 06:47:25 -05001#!/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
5lowerdir=$1
6datamountpoint=$2
7mkdir -p ${datamountpoint}/upper${lowerdir}
8mkdir -p ${datamountpoint}/workdir${lowerdir}
9if [ -d "$lowerdir" ]; then
10 chown $(stat -c "%U:%G" ${lowerdir}) ${datamountpoint}/upper${lowerdir}
11fi