summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/volatile-binds
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/volatile-binds')
-rwxr-xr-xmeta/recipes-core/volatile-binds/files/mount-copybind7
-rw-r--r--meta/recipes-core/volatile-binds/volatile-binds.bb4
2 files changed, 6 insertions, 5 deletions
diff --git a/meta/recipes-core/volatile-binds/files/mount-copybind b/meta/recipes-core/volatile-binds/files/mount-copybind
index ddc4357615..5885880534 100755
--- a/meta/recipes-core/volatile-binds/files/mount-copybind
+++ b/meta/recipes-core/volatile-binds/files/mount-copybind
@@ -45,9 +45,11 @@ if [ -d "$mountpoint" ]; then
45 45
46 # Fast version of calculating `dirname ${spec}`/.`basename ${spec}`-work 46 # Fast version of calculating `dirname ${spec}`/.`basename ${spec}`-work
47 overlay_workdir="${spec%/*}/.${spec##*/}-work" 47 overlay_workdir="${spec%/*}/.${spec##*/}-work"
48 mkdir "${overlay_workdir}" 48 if [ "$MOUNT_COPYBIND_AVOID_OVERLAYFS" != 1 ]; then
49 mkdir "${overlay_workdir}"
50 fi
49 51
50 # Try to mount using overlay, which is must faster than copying files. 52 # Try to mount using overlay, which is much faster than copying files.
51 # If that fails, fall back to slower copy. 53 # If that fails, fall back to slower copy.
52 if command -v selinuxenabled > /dev/null 2>&1; then 54 if command -v selinuxenabled > /dev/null 2>&1; then
53 if selinuxenabled; then 55 if selinuxenabled; then
@@ -55,6 +57,7 @@ if [ -d "$mountpoint" ]; then
55 fi 57 fi
56 fi 58 fi
57 if [ "$MOUNT_COPYBIND_AVOID_OVERLAYFS" = 1 ] || ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir""$mountcontext" "$mountpoint" > /dev/null 2>&1; then 59 if [ "$MOUNT_COPYBIND_AVOID_OVERLAYFS" = 1 ] || ! mount -t overlay overlay -olowerdir="$mountpoint",upperdir="$spec",workdir="$overlay_workdir""$mountcontext" "$mountpoint" > /dev/null 2>&1; then
60 rm -rf "$overlay_workdir"
58 61
59 if [ "$specdir_existed" != "yes" ]; then 62 if [ "$specdir_existed" != "yes" ]; then
60 cp -aPR "$mountpoint"/. "$spec/" 63 cp -aPR "$mountpoint"/. "$spec/"
diff --git a/meta/recipes-core/volatile-binds/volatile-binds.bb b/meta/recipes-core/volatile-binds/volatile-binds.bb
index cca8a65fb4..857bcc93ff 100644
--- a/meta/recipes-core/volatile-binds/volatile-binds.bb
+++ b/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -9,7 +9,7 @@ SRC_URI = "\
9 file://volatile-binds.service.in \ 9 file://volatile-binds.service.in \
10" 10"
11 11
12S = "${WORKDIR}" 12S = "${UNPACKDIR}"
13 13
14inherit allarch systemd features_check 14inherit allarch systemd features_check
15 15
@@ -64,7 +64,6 @@ END
64 "$var_lib_servicefile" 64 "$var_lib_servicefile"
65 fi 65 fi
66} 66}
67do_compile[dirs] = "${WORKDIR}"
68 67
69do_install () { 68do_install () {
70 install -d ${D}${base_sbindir} 69 install -d ${D}${base_sbindir}
@@ -82,4 +81,3 @@ do_install () {
82 ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf 81 ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf
83 ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf 82 ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf
84} 83}
85do_install[dirs] = "${WORKDIR}"