From: NeilBrown <neilb@suse.de>
To: mwilck@arcor.de
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 6/6] mdmon: allow disabling "@dmon" command name at compile time
Date: Wed, 28 Aug 2013 15:15:05 +1000 [thread overview]
Message-ID: <20130828151505.222eaa0a@notabene.brown> (raw)
In-Reply-To: <1376677320-12816-7-git-send-email-mwilck@arcor.de>
[-- Attachment #1: Type: text/plain, Size: 2653 bytes --]
On Fri, 16 Aug 2013 20:22:00 +0200 mwilck@arcor.de wrote:
> mdmon sets its command name to "@dmon" on distributions using systemd
> to tell systemd not to kill it during shutdown.
>
> Some older tools (e.g. the anaconda loader on RHEL6 during installation)
> look specifically for "mdmon" and won't work with "@dmon". They can't be
> fixed any more. So, this patch introduces the macro SYSTEMD to disable
> changing the command name. Default is to assume that mdmon is started
> by systemd.
>
> Signed-off-by: Martin Wilck <mwilck@arcor.de>
> ---
> Makefile | 4 +++-
> mdmon.c | 2 ++
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e8da3a5..5970b90 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -77,11 +77,13 @@ MAP_PATH = $(MAP_DIR)/$(MAP_FILE)
> MDMON_DIR = $(RUN_DIR)
> # place for autoreplace cookies
> FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
> +# set SYSTEMD to 1 for distributions where mdmon is started by systemd
> +SYSTEMD = 1
> SYSTEMD_DIR=/lib/systemd/system
> DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
> DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
> DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\"
> -CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS)
> +CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS) -DSYSTEMD=$(SYSTEMD)
>
> VERSION = $(shell [ -d .git ] && git describe HEAD | sed 's/mdadm-//')
> VERS_DATE = $(shell [ -d .git ] && date --date="`git log -n1 --format=format:%cd --date=short`" '+%0dth %B %Y' | sed -e 's/1th/1st/' -e 's/2th/2nd/' -e 's/11st/11th/' -e 's/12nd/12th/')
> diff --git a/mdmon.c b/mdmon.c
> index f0b0623..132b469 100644
> --- a/mdmon.c
> +++ b/mdmon.c
> @@ -298,6 +298,7 @@ int main(int argc, char *argv[])
> {NULL, 0, NULL, 0}
> };
>
> +#if (SYSTEMD == 1)
> if (in_initrd()) {
> /*
> * set first char of argv[0] to @. This is used by
> @@ -306,6 +307,7 @@ int main(int argc, char *argv[])
> */
> argv[0][0] = '@';
> }
> +#endif
>
> while ((opt = getopt_long(argc, argv, "thaF", options, NULL)) != -1) {
> switch (opt) {
Can you help me understand? What is anaconda even looking for mdmon?
Does it need exactly "mdmon" or would "@mdmon" be OK?
Does "started by systemd" mean that "systemctl start mdmon@mdXXX.service" was
used to start it? In that case can't we put something in
systemd/mdmon@.service to make the right thing happen?
I'm going to hold off on this one for the moment.
All others applied.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-08-28 5:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 18:21 [PATCH 0/6] Fixes for installation of CentOS 6 on DDF BIOS RAID mwilck
2013-08-16 18:21 ` [PATCH 1/6] DDF: ddf_activate_spare: fix gcc -O2 uninitialized warning mwilck
2013-08-28 4:57 ` NeilBrown
2013-08-16 18:21 ` [PATCH 2/6] DDF: export_examine_super_ddf: print MD_DEVICES mwilck
2013-08-16 18:21 ` [PATCH 3/6] DDF: container_content_ddf: set safe_mode_delay > 0 mwilck
2013-08-16 18:21 ` [PATCH 4/6] DDF: increase default value for safe_mode_delay to 4000ms mwilck
2013-08-16 18:21 ` [PATCH 5/6] in_initrd: fix gcc compiler error mwilck
2013-08-28 5:08 ` NeilBrown
2013-08-16 18:22 ` [PATCH 6/6] mdmon: allow disabling "@dmon" command name at compile time mwilck
2013-08-28 5:15 ` NeilBrown [this message]
2013-09-01 17:20 ` Martin Wilck
2013-09-02 1:07 ` NeilBrown
2013-09-02 18:47 ` Martin Wilck
2013-09-02 22:40 ` NeilBrown
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=20130828151505.222eaa0a@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=mwilck@arcor.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;
as well as URLs for NNTP newsgroup(s).