From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Alexander Dahl <ada@thorsis.com>
Subject: Re: [ptxdist] [APPLIED] mtd-utils: Introduce systemd unit for ubihealthd
Date: Thu, 7 Oct 2021 12:18:54 +0200 [thread overview]
Message-ID: <20211007101854.3926760-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20210909101652.9288-3-ada@thorsis.com>
Thanks, applied as 434bd8a2cee93a599e2d282a152842447aa45cb4.
Michael
[sent from post-receive hook]
On Thu, 07 Oct 2021 12:18:53 +0200, Alexander Dahl <ada@thorsis.com> 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 <ada@thorsis.com>
> Message-Id: <20210909101652.9288-3-ada@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/projectroot/usr/lib/systemd/system/ubihealthd@.service b/projectroot/usr/lib/systemd/system/ubihealthd@.service
> new file mode 100644
> index 000000000000..f3f0ba25fe05
> --- /dev/null
> +++ b/projectroot/usr/lib/systemd/system/ubihealthd@.service
> @@ -0,0 +1,13 @@
> +# enable with `systemctl enable ubihealthd@ubi0.service`
> +
> +[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/ubihealthd@.service)
> + @$(call install_link, mtd-utils, ../ubihealthd@.service, \
> + /usr/lib/systemd/system/multi-user.target.wants/ubihealthd@ubi0.service)
> +endif
> endif
> ifdef PTXCONF_MTD_UTILS_UBIMKVOL
> @$(call install_copy, mtd-utils, 0, 0, 0755, -, \
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
prev parent reply other threads:[~2021-10-07 10:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 10:16 [ptxdist] [PATCH 0/2] mtd-utils: Version bump and ubihealthd systemd unit Alexander Dahl
2021-09-09 10:16 ` [ptxdist] [PATCH 1/2] mtd-utils: version bump 2.1.2 -> 2.1.3 Alexander Dahl
2021-10-07 10:18 ` [ptxdist] [APPLIED] " Michael Olbrich
2021-09-09 10:16 ` [ptxdist] [PATCH 2/2] mtd-utils: Introduce systemd unit for ubihealthd Alexander Dahl
2021-10-07 10:18 ` Michael Olbrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211007101854.3926760-1-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ada@thorsis.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox