@@ -77,6 +77,9 @@ export XFS_MKFS_OPTIONS=${XFS_MKFS_OPTIONS:=-bsize=4096}
export TIME_FACTOR=${TIME_FACTOR:=1}
export LOAD_FACTOR=${LOAD_FACTOR:=1}
export DEBUGFS_MNT=${DEBUGFS_MNT:="/sys/kernel/debug"}
+export OVERLAY_UPPER_DIR=${OVERLAY_UPPER_DIR:="upper"}
+export OVERLAY_LOWER_DIR=${OVERLAY_LOWER_DIR:="lower"}
+export OVERLAY_WORK_DIR=${OVERLAY_WORK_DIR:="work"}
export PWD=`pwd`
#export DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
@@ -244,7 +244,7 @@ _common_dev_mount_options()
_overlay_basic_mount_options()
{
- echo "-o lowerdir=$1/lower,upperdir=$1/upper,workdir=$1/work"
+ echo "-o lowerdir=$1/$OVERLAY_LOWER_DIR,upperdir=$1/$OVERLAY_UPPER_DIR,workdir=$1/$OVERLAY_WORK_DIR"
}
_overlay_mount_options()
@@ -273,14 +273,14 @@ _overlay_mount()
local dir=$1
local mnt=$2
shift 2
- mkdir -p $dir/upper
- mkdir -p $dir/lower
- mkdir -p $dir/work
+ mkdir -p $dir/$OVERLAY_UPPER_DIR
+ mkdir -p $dir/$OVERLAY_LOWER_DIR
+ mkdir -p $dir/$OVERLAY_WORK_DIR
$MOUNT_PROG -t overlay $SELINUX_MOUNT_OPTIONS \
- -o lowerdir=$dir/lower \
- -o upperdir=$dir/upper \
- -o workdir=$dir/work \
+ -o lowerdir=$dir/$OVERLAY_LOWER_DIR \
+ -o upperdir=$dir/$OVERLAY_UPPER_DIR \
+ -o workdir=$dir/$OVERLAY_WORK_DIR \
$OVERLAY_MOUNT_OPTIONS $* \
$dir $mnt
}
This turns hard coded lower/upper/work dir names to configurable variables. Suggested-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com> --- This is new patch for v2 of this series. common/config | 3 +++ common/rc | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-)