diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-04 12:28:01 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-04 12:28:01 +0000 |
commit | 653829259ffede92ff2785227024b4e2b2aa6e98 (patch) | |
tree | ea7beef2d21d84d5432ee4916f9acacd2ac6ec21 /perl-install/install | |
parent | e19a36d570835214989d5a7db9954ed122c7d676 (diff) | |
download | drakx-653829259ffede92ff2785227024b4e2b2aa6e98.tar drakx-653829259ffede92ff2785227024b4e2b2aa6e98.tar.gz drakx-653829259ffede92ff2785227024b4e2b2aa6e98.tar.bz2 drakx-653829259ffede92ff2785227024b4e2b2aa6e98.tar.xz drakx-653829259ffede92ff2785227024b4e2b2aa6e98.zip |
(start_udev) split it out of main()
Diffstat (limited to 'perl-install/install')
-rw-r--r-- | perl-install/install/install2.pm | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 32a60279e..8979ad8ae 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -288,6 +288,26 @@ sub exitInstall { } +sub start_udev() { + # Ensure /run is mounted + mkdir "/run", 0755; + run_program::run("mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run"); + mkdir "/run/udev", 0755; + mkdir "/run/udev/rules.d", 0755; + $ENV{UDEVRULESD} = "/run/udev/rules.d"; + + # Start up udev and trigger cold plugs + run_program::run("mount", "-t", "devtmpfs", "-o", "mode=0755,nosuid", "devtmpfs", "/dev"); + mkdir "/dev/pts", 0755; + run_program::run("mount", "-t", "devpts", "-o", "gid=5,mode=620,noexec,nosuid", "devpts", "/dev/pts"); + mkdir "/dev/shm", 0755; + run_program::run("mount", "-t", "tmpfs", "-o", "mode=1777,nosuid,nodev", "tmpfs", "/dev/shm"); + + run_program::run("/lib/udev/udevd", "--daemon", "--resolve-names=never"); + run_program::run("udevadm", "trigger", "--type=subsystems", "--action=add"); + run_program::run("udevadm", "trigger", "--type=devices", "--action=add"); +} + #-###################################################################################### #- MAIN #-###################################################################################### @@ -395,23 +415,7 @@ sub main { eval { fs::mount::mount('none', '/sys', 'sysfs', 1) }; eval { touch('/root/non-chrooted-marker.DrakX') }; #- helps distinguishing /root and /mnt/root when we don't know if we are chrooted - # Ensure /run is mounted - mkdir "/run", 0755; - run_program::run("mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run"); - mkdir "/run/udev", 0755; - mkdir "/run/udev/rules.d", 0755; - $ENV{UDEVRULESD} = "/run/udev/rules.d"; - - # Start up udev and trigger cold plugs - run_program::run("mount", "-t", "devtmpfs", "-o", "mode=0755,nosuid", "devtmpfs", "/dev"); - mkdir "/dev/pts", 0755; - run_program::run("mount", "-t", "devpts", "-o", "gid=5,mode=620,noexec,nosuid", "devpts", "/dev/pts"); - mkdir "/dev/shm", 0755; - run_program::run("mount", "-t", "tmpfs", "-o", "mode=1777,nosuid,nodev", "tmpfs", "/dev/shm"); - - run_program::run("/lib/udev/udevd", "--daemon", "--resolve-names=never"); - run_program::run("udevadm", "trigger", "--type=subsystems", "--action=add"); - run_program::run("udevadm", "trigger", "--type=devices", "--action=add"); + start_udev(); if ($::local_install) { push @::auto_steps, |