1
0
Fork 0
mirror of https://github.com/pygos/init-scripts.git synced 2024-11-15 01:17:11 +01:00
init-scripts/scripts/overlay.sh

12 lines
232 B
Bash
Raw Normal View History

#!/bin/sh
lower=/cfg/preserve/${1}
upper=/cfg/overlay/${1}
work=/cfg/overlay/${1}_work
target=${2}
mkdir -p "$work" "$upper"
mount -t overlay overlay \
-olowerdir=${lower},upperdir=${upper},workdir=${work} \
"$target"