diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-02 14:20:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-02 14:20:54 +0000 |
commit | 6640f9593094c2cb381eced96e2437a5f2a5e64f (patch) | |
tree | ee569db8b6ad16c705fe6fdb21cce7bef4b11aa2 | |
parent | 7de4191b23eec355fb316888a2f05210232ff270 (diff) | |
download | drakx-6640f9593094c2cb381eced96e2437a5f2a5e64f.tar drakx-6640f9593094c2cb381eced96e2437a5f2a5e64f.tar.gz drakx-6640f9593094c2cb381eced96e2437a5f2a5e64f.tar.bz2 drakx-6640f9593094c2cb381eced96e2437a5f2a5e64f.tar.xz drakx-6640f9593094c2cb381eced96e2437a5f2a5e64f.zip |
move code to create_minimal_files()
-rw-r--r-- | perl-install/install2.pm | 10 | ||||
-rw-r--r-- | perl-install/install_any.pm | 12 |
2 files changed, 13 insertions, 9 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 0e5bbd1e5..ff8f00724 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -177,15 +177,7 @@ sub formatPartitions { eval { rm_rf("$o->{prefix}/var/lib/rpm") }; } - mkdir "$o->{prefix}/$_", 0755 foreach - qw(dev etc etc/profile.d etc/rpm etc/sysconfig etc/sysconfig/console - etc/sysconfig/network-scripts etc/sysconfig/console/consolefonts - etc/sysconfig/console/consoletrans - home mnt tmp var var/tmp var/lib var/lib/rpm var/lib/urpmi); - mkdir "$o->{prefix}/$_", 0700 foreach qw(root root/tmp root/drakx); - - devices::make("$o->{prefix}/dev/null"); - chmod 0666, "$o->{prefix}/dev/null"; + install_any::create_minimal_files(); eval { fs::mount::mount('none', "$::prefix/proc", 'proc') }; eval { fs::mount::mount('none', "$::prefix/sys", 'sysfs') }; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index fde155b26..5f73d4a62 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -680,6 +680,18 @@ sub setPackages { } } +sub create_minimal_files() { + mkdir "$::prefix/$_", 0755 foreach + qw(dev etc etc/profile.d etc/rpm etc/sysconfig etc/sysconfig/console + etc/sysconfig/network-scripts etc/sysconfig/console/consolefonts + etc/sysconfig/console/consoletrans + home mnt tmp var var/tmp var/lib var/lib/rpm var/lib/urpmi); + mkdir "$::prefix/$_", 0700 foreach qw(root root/tmp root/drakx); + + devices::make("$::prefix/dev/null"); + chmod 0666, "$::prefix/dev/null"; +} + sub count_files { my ($dir) = @_; -d $dir or return 0; |