[OE-core] [PATCH 10/20] udev-cache: parametrize sysconf file paths

Otavio Salvador otavio at ossystems.com.br
Mon Aug 4 19:44:19 UTC 2014


On Mon, Aug 4, 2014 at 3:41 PM, Ben Shelton <ben.shelton at ni.com> wrote:
> From: Richard Tollerton <rich.tollerton at ni.com>
>
> The udev-cache facility uses files that represent system states, to
> ensure that the cache tarball is valid to apply. These paths were
> hardcoded in several places; collect them into DEVCACHE_SYSCONF and
> DEVCACHE_CURRENT_SYSCONF in the defaults file.
>
> Natinst-Rally-ID: TA44427
> Acked-by: Gratian Crisan <gratian.crisan at ni.com>
> Natinst-ReviewBoard-ID: 58620
> Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
> ---
...
> --- a/meta/recipes-core/udev/udev/udev-cache
> +++ b/meta/recipes-core/udev/udev/udev-cache
> @@ -23,12 +23,12 @@ if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
>      exit 0
>  fi
>
> -if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
> +if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_CURRENT_SYSCONF" ]; then
>         [ "${VERBOSE}" != "no" ] && echo "Populating dev cache"
>         (
>                 tar czf "${DEVCACHE}.tmp" dev -C / --exclude=log
>                 mv -f "${DEVCACHE}.tmp" "$DEVCACHE"
> -               mv /dev/shm/udev.cache /etc/udev/cache.data
> +               mv "$DEVCACHE_CURRENT_SYSCONF" "$DEVCACHE_SYSCONF"
>         ) &
>  fi
>
> diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
> index 656c2a4..7f39a68 100644
> --- a/meta/recipes-core/udev/udev/udev-cache.default
> +++ b/meta/recipes-core/udev/udev/udev-cache.default
> @@ -2,4 +2,8 @@
>
>  # Comment this out to disable device cache
>  DEVCACHE="/etc/udev-cache.tar.gz"
> +
> +DEVCACHE_SYSCONF="/etc/udev/cache.data"
> +DEVCACHE_CURRENT_SYSCONF="/dev/shm/udev.cache"
> +
>  PROBE_PLATFORM_BUS="yes"
> --

Most users won't need to change this so I think this should have a
default value in the script and don't be added in the default.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the Openembedded-core mailing list