diff options
| -rw-r--r-- | meta/recipes-core/volatile-binds/volatile-binds.bb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/recipes-core/volatile-binds/volatile-binds.bb b/meta/recipes-core/volatile-binds/volatile-binds.bb index 3fefa9abde..cca8a65fb4 100644 --- a/meta/recipes-core/volatile-binds/volatile-binds.bb +++ b/meta/recipes-core/volatile-binds/volatile-binds.bb | |||
| @@ -16,10 +16,10 @@ inherit allarch systemd features_check | |||
| 16 | REQUIRED_DISTRO_FEATURES = "systemd" | 16 | REQUIRED_DISTRO_FEATURES = "systemd" |
| 17 | 17 | ||
| 18 | VOLATILE_BINDS ?= "\ | 18 | VOLATILE_BINDS ?= "\ |
| 19 | /var/volatile/lib /var/lib\n\ | 19 | ${localstatedir}/volatile/lib ${localstatedir}/lib\n\ |
| 20 | /var/volatile/cache /var/cache\n\ | 20 | ${localstatedir}/volatile/cache ${localstatedir}/cache\n\ |
| 21 | /var/volatile/spool /var/spool\n\ | 21 | ${localstatedir}/volatile/spool ${localstatedir}/spool\n\ |
| 22 | /var/volatile/srv /srv\n\ | 22 | ${localstatedir}/volatile/srv /srv\n\ |
| 23 | " | 23 | " |
| 24 | VOLATILE_BINDS[type] = "list" | 24 | VOLATILE_BINDS[type] = "list" |
| 25 | VOLATILE_BINDS[separator] = "\n" | 25 | VOLATILE_BINDS[separator] = "\n" |
| @@ -46,8 +46,8 @@ do_compile () { | |||
| 46 | continue | 46 | continue |
| 47 | fi | 47 | fi |
| 48 | 48 | ||
| 49 | servicefile="${spec#/}" | 49 | servicefile="$(echo "${spec#/}" | tr / -).service" |
| 50 | servicefile="$(echo "$servicefile" | tr / -).service" | 50 | [ "$mountpoint" != ${localstatedir}/lib ] || var_lib_servicefile=$servicefile |
| 51 | sed -e "s#@what@#$spec#g; s#@where@#$mountpoint#g" \ | 51 | sed -e "s#@what@#$spec#g; s#@where@#$mountpoint#g" \ |
| 52 | -e "s#@whatparent@#${spec%/*}#g; s#@whereparent@#${mountpoint%/*}#g" \ | 52 | -e "s#@whatparent@#${spec%/*}#g; s#@whereparent@#${mountpoint%/*}#g" \ |
| 53 | -e "s#@avoid_overlayfs@#${@d.getVar('AVOID_OVERLAYFS')}#g" \ | 53 | -e "s#@avoid_overlayfs@#${@d.getVar('AVOID_OVERLAYFS')}#g" \ |
| @@ -56,12 +56,12 @@ do_compile () { | |||
| 56 | ${@d.getVar('VOLATILE_BINDS').replace("\\n", "\n")} | 56 | ${@d.getVar('VOLATILE_BINDS').replace("\\n", "\n")} |
| 57 | END | 57 | END |
| 58 | 58 | ||
| 59 | if [ -e var-volatile-lib.service ]; then | 59 | if [ -e "$var_lib_servicefile" ]; then |
| 60 | # As the seed is stored under /var/lib, ensure that this service runs | 60 | # As the seed is stored under /var/lib, ensure that this service runs |
| 61 | # after the volatile /var/lib is mounted. | 61 | # after the volatile /var/lib is mounted. |
| 62 | sed -i -e "/^Before=/s/\$/ systemd-random-seed.service/" \ | 62 | sed -i -e "/^Before=/s/\$/ systemd-random-seed.service/" \ |
| 63 | -e "/^WantedBy=/s/\$/ systemd-random-seed.service/" \ | 63 | -e "/^WantedBy=/s/\$/ systemd-random-seed.service/" \ |
| 64 | var-volatile-lib.service | 64 | "$var_lib_servicefile" |
| 65 | fi | 65 | fi |
| 66 | } | 66 | } |
| 67 | do_compile[dirs] = "${WORKDIR}" | 67 | do_compile[dirs] = "${WORKDIR}" |
| @@ -78,7 +78,7 @@ do_install () { | |||
| 78 | 78 | ||
| 79 | # Suppress attempts to process some tmpfiles that are not temporary. | 79 | # Suppress attempts to process some tmpfiles that are not temporary. |
| 80 | # | 80 | # |
| 81 | install -d ${D}${sysconfdir}/tmpfiles.d ${D}/var/cache | 81 | install -d ${D}${sysconfdir}/tmpfiles.d ${D}${localstatedir}/cache |
| 82 | ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf | 82 | ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf |
| 83 | ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf | 83 | ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf |
| 84 | } | 84 | } |
