Re: [PATCH] Stop /lib/udev/rules.d/65-md-incremental.rules from messing with mdraid sets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-09-30 at 20:40 +0200, Hans de Goede wrote:
> Touch /dev/.in_sysinit, as that stops /lib/udev/rules.d/65-md-incremental.rules
> from messing with mdraid sets.
> 
> This patch adds the touching twice, once to our own init, for when running
> as standalone installer, and once in python for when running from a livecd,
> to stop the udev trigger "block" we do will cause
> /lib/udev/rules.d/65-md-incremental.rules to trigger in the livecd case.

Ugh. This is like trying to decide how best to decorate a home made of
shit.

It seems like we will want, at some point, to start filtering which
rules files we include in the runtime images. However, for the time
being, this seems like it will do the trick.

Dave

> ---
>  loader/init.c       |    5 +++++
>  storage/__init__.py |    4 ++++
>  2 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/loader/init.c b/loader/init.c
> index 627428e..d941f86 100644
> --- a/loader/init.c
> +++ b/loader/init.c
> @@ -386,6 +386,11 @@ static void createDevices(void) {
>              fprintf(stderr, "Unable to create device %s: %m\n", devname);
>      }
>  
> +    /* Hurray for hacks, this stops /lib/udev/rules.d/65-md-incremental.rules
> +       from medling with mdraid sets. */
> +    i = creat("/dev/.in_sysinit", 0644);
> +    close(i);
> +
>      /* Restore umask for minimal side affects */
>      umask(previous_umask); 
>  }
> diff --git a/storage/__init__.py b/storage/__init__.py
> index 376eda2..62f0021 100644
> --- a/storage/__init__.py
> +++ b/storage/__init__.py
> @@ -65,6 +65,10 @@ def storageInitialize(anaconda):
>      if anaconda.dir == DISPATCH_BACK:
>          return
>  
> +    # touch /dev/.in_sysinit so that /lib/udev/rules.d/65-md-incremental.rules
> +    # does not mess with any mdraid sets
> +    open("/dev/.in_sysinit", "w")
> +
>      # XXX I don't understand why I have to do this
>      udev_trigger(subsystem="block")
>  

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux