Thanks, applied as 434bd8a2cee93a599e2d282a152842447aa45cb4.

Michael

[sent from post-receive hook]

On Thu, 07 Oct 2021 12:18:53 +0200, Alexander Dahl <[email protected]> wrote:
> It's possible to run multiple instances for multiple ubi devices by
> creating multiple symlinks. One symlink for the first device ubi0 is
> already created.
> 
> Signed-off-by: Alexander Dahl <[email protected]>
> Message-Id: <[email protected]>
> Signed-off-by: Michael Olbrich <[email protected]>
> 
> diff --git a/projectroot/usr/lib/systemd/system/[email protected] 
> b/projectroot/usr/lib/systemd/system/[email protected]
> new file mode 100644
> index 000000000000..f3f0ba25fe05
> --- /dev/null
> +++ b/projectroot/usr/lib/systemd/system/[email protected]
> @@ -0,0 +1,13 @@
> +# enable with `systemctl enable [email protected]`
> +
> +[Unit]
> +Description=ubihealthd UBI device PEB scan daemon for %I
> +BindsTo=dev-%i.device
> +After=dev-%i.device
> +
> +[Service]
> +Type=forking
> +ExecStart=/usr/sbin/ubihealthd -d /dev/%I -i 120
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
> index 11b0be23f03d..0d8fb5f5a0df 100644
> --- a/rules/mtd-utils.in
> +++ b/rules/mtd-utils.in
> @@ -294,13 +294,23 @@ config MTD_UTILS_UBIFS_MOUNTHELPER
>       help
>         Simplifies attaching an ubi and mounting an ubifs via /etc/fstab.
>  
> -config MTD_UTILS_UBIHEALTHD
> +menuconfig MTD_UTILS_UBIHEALTHD
>       bool
>       prompt "ubihealthd"
>       help
>         Daemon that randomly scans each PEB of a UBI device to ensure that
>         filesystems with little reading do enough wear leveling.
>  
> +if MTD_UTILS_UBIHEALTHD
> +
> +config MTD_UTILS_UBIHEALTHD_SYSTEMD_UNIT
> +     bool
> +     prompt "install systemd unit files"
> +     default y
> +     depends on SYSTEMD
> +
> +endif
> +
>  config MTD_UTILS_UBIMKVOL
>       bool
>       prompt "ubimkvol"
> diff --git a/rules/mtd-utils.make b/rules/mtd-utils.make
> index 15288acd7ad1..d96ab02b0a7d 100644
> --- a/rules/mtd-utils.make
> +++ b/rules/mtd-utils.make
> @@ -205,6 +205,12 @@ endif
>  ifdef PTXCONF_MTD_UTILS_UBIHEALTHD
>       @$(call install_copy, mtd-utils, 0, 0, 0755, -, \
>               /usr/sbin/ubihealthd)
> +ifdef PTXCONF_MTD_UTILS_UBIHEALTHD_SYSTEMD_UNIT
> +     @$(call install_alternative, mtd-utils, 0, 0, 0644, \
> +             /usr/lib/systemd/system/[email protected])
> +     @$(call install_link, mtd-utils, ../[email protected], \
> +             
> /usr/lib/systemd/system/multi-user.target.wants/[email protected])
> +endif
>  endif
>  ifdef PTXCONF_MTD_UTILS_UBIMKVOL
>       @$(call install_copy, mtd-utils, 0, 0, 0755, -, \

_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to