Re: [PATCH] Don't run 70-anaconda.rules on an installed system (#527781).

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

 



Ack.

Chris Lumens wrote:
The livecd includes anaconda, for obvious reasons.  However this means that
70-anaconda.rules will be installed on the finished system and running our
rules has some unusual side effects.  While we slowly push our udev rules
changes into upstream packages, this should make them a no-op on the
installed system.
---
 70-anaconda.rules   |    3 +++
 loader/init.c       |    2 ++
 loader/linuxrc.s390 |    2 ++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/70-anaconda.rules b/70-anaconda.rules
index bad99dd..d6cb2af 100644
--- a/70-anaconda.rules
+++ b/70-anaconda.rules
@@ -1,3 +1,6 @@
+# If $ANACONDA isn't set in the environment, skip all these rules.
+ENV{ANACONDA}!=".*", GOTO="anaconda_end"
+
 ACTION!="add|change", GOTO="anaconda_end"
 SUBSYSTEM!="block", GOTO="anaconda_end"
diff --git a/loader/init.c b/loader/init.c
index d941f86..bab5721 100644
--- a/loader/init.c
+++ b/loader/init.c
@@ -529,6 +529,8 @@ int main(int argc, char **argv) {
 	    execl("/sbin/udevd", "/sbin/udevd","--daemon",NULL);
 	    exit(1);
 	}
+
+        execl("/sbin/udevadm", "udevadm", "control", "--env=ANACONDA=1", NULL);
     }
     printf("done\n");
diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index baec1e3..0ab424f 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -256,6 +256,8 @@ function init_main() {
         udevd --daemon
         # debug: udevadm control --log-priority=debug
+ udevadm control --env=ANACONDA=1
+
         mount -t devpts /dev/pts /dev/pts
         mount -t sysfs none /sys

_______________________________________________
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