summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-06 17:02:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-06 17:02:14 +0000
commit66a728f33639c6b4ca379e310f3c2536123fc014 (patch)
treefe6308c41aaf8252ff315e800cd0aab2b84b796a /perl-install
parentd5bdac3e48cbdf2317dc6bcf98cd5a5117af5ac0 (diff)
downloaddrakx-66a728f33639c6b4ca379e310f3c2536123fc014.tar
drakx-66a728f33639c6b4ca379e310f3c2536123fc014.tar.gz
drakx-66a728f33639c6b4ca379e310f3c2536123fc014.tar.bz2
drakx-66a728f33639c6b4ca379e310f3c2536123fc014.tar.xz
drakx-66a728f33639c6b4ca379e310f3c2536123fc014.zip
obsolete livedrake, live_install, live_update
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile1
-rw-r--r--perl-install/Makefile.config2
-rw-r--r--perl-install/Xconfig/card.pm1
-rw-r--r--perl-install/detect_devices.pm2
-rw-r--r--perl-install/install2.pm8
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/install_gtk.pm1
-rw-r--r--perl-install/install_steps.pm4
-rwxr-xr-xperl-install/live_install45
-rwxr-xr-xperl-install/live_install267
-rw-r--r--perl-install/modules.pm2
-rwxr-xr-xperl-install/standalone/livedrake40
12 files changed, 9 insertions, 166 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 73553eb71..6f0045351 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -77,7 +77,6 @@ install_pms: $(DIRS)
cp share/*.rc $(DESTREP4PMS)
chmod a+x $(DESTREP4PMS)/install2
chmod a+x $(DESTREP4PMS)/commands
- chmod a+x $(DESTREP4PMS)/live_install*
mo_files : $(MOFILES)
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config
index 36621137e..6e9a31062 100644
--- a/perl-install/Makefile.config
+++ b/perl-install/Makefile.config
@@ -12,7 +12,7 @@ VERSION = 2.2.10-BOOT
SUDO = sudo
SO_FILES = c/blib/arch/auto/c/c.so
PMS_DIRS = Newt Xconfig c diskdrake harddrake interactive modules network partition_table printer resize_fat sbus_probing security
-PMS = *.pm $(PMS_DIRS:%=%/*.pm) commands install2 g_auto_install live_install2
+PMS = *.pm $(PMS_DIRS:%=%/*.pm) commands install2
STANDALONEPMS_ = XFdrake adduserdrake diskdrake drakTermServ drakautoinst drakauth drakbackup drakboot drakbug drakbug_report drakclock drakconnect drakedm drakfirewall drakfloppy drakfont drakgw drakhelp drakperm drakproxy drakpxe draksec draksound draksplash drakupdate_fstab drakups drakxservices drakxtv fileshareset harddrake2 keyboarddrake livedrake localedrake logdrake lsnetdrake mousedrake net_monitor printerdrake scannerdrake service_harddrake
STANDALONEPMS = $(STANDALONEPMS_:%=standalone/%)
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 26b829759..52ce4f177 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -559,7 +559,6 @@ sub check_bad_card {
my ($card) = @_;
my $bad_card = using_xf4($card) ? $card->{BAD_FB_RESTORE} : $card->{BAD_FB_RESTORE_XF3};
$bad_card ||= $card->{Driver} eq 'i810' || $card->{Driver} eq 'fbdev';
- $bad_card ||= $card->{Driver} eq 's3virge' if $::live;
$bad_card ||= $card->{Driver} eq 'nvidia' if !$::isStandalone; #- avoid testing during install at any price.
$bad_card ||= $card->{server} =~ /FBDev|Sun/ if !using_xf4($card);
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 4df09ae12..4aea403b8 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -424,7 +424,7 @@ sub getSagem() {
}
sub getNet() {
- grep { !(($::isStandalone || $::live) && /plip/) && c::hasNetDevice($_) }
+ grep { !($::isStandalone && /plip/) && c::hasNetDevice($_) }
grep { /^(eth|fddi|plip|tr|usb|wifi|wlan)/ }
map_index {
# skip headers
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 10bca278a..05ff0e46f 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -372,7 +372,6 @@ sub main {
display => sub { $o->{display} = $v },
askdisplay => sub { print "Please enter the X11 display to perform the install on ? "; $o->{display} = chomp_(scalar(<STDIN>)) },
security => sub { $o->{security} = $v },
- live => sub { $::live = 1 },
noauto => sub { $::noauto = 1 },
test => sub { $::testing = 1 },
patch => sub { $patch = 1 },
@@ -408,7 +407,7 @@ sub main {
}
undef $::auto_install if $cfg;
- if (!$::testing && !$::live) {
+ if (!$::testing) {
symlink "rhimage", "/tmp/image"; #- for compatibility with old stage1
unlink $_ foreach "/modules/modules.mar", "/sbin/stage1";
}
@@ -421,8 +420,7 @@ sub main {
move::init($o);
}
- $o->{prefix} = $::prefix = $::testing ? "/tmp/test-perl-install" : $::live || $::move ? "" : "/mnt";
- $o->{isUpgrade} = 1 if $::live;
+ $o->{prefix} = $::prefix = $::testing ? "/tmp/test-perl-install" : $::move ? "" : "/mnt";
mkdir $o->{prefix}, 0755;
devices::make("/dev/zero"); #- needed by ddcxinfos
@@ -651,7 +649,7 @@ sub main {
my $now = time() - 24 * 60 * 60;
utime $now, $now, "$o->{prefix}/$_";
}
- $::live or install_any::killCardServices();
+ install_any::killCardServices();
#- make sure failed upgrade will not hurt too much.
install_steps::cleanIfFailedUpgrade($o);
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index cbffc10d9..94b395104 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1054,7 +1054,7 @@ sub set_security {
sub write_fstab {
my ($o) = @_;
- fs::write_fstab($o->{all_hds}, $o->{prefix}) if !$::live && !$o->{isUpgrade};
+ fs::write_fstab($o->{all_hds}, $o->{prefix}) if !$o->{isUpgrade};
}
my @bigseldom_used_groups = (
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm
index d151101c5..5270220e3 100644
--- a/perl-install/install_gtk.pm
+++ b/perl-install/install_gtk.pm
@@ -225,7 +225,6 @@ q(<fontconfig>
#------------------------------------------------------------------------------
sub init_sizes() {
($::rootwidth, $::rootheight) = (Gtk2::Gdk->screen_width, Gtk2::Gdk->screen_height);
- $::live and $::rootheight -= 80;
#- ($::rootheight, $::rootwidth) = (min(768, $::rootheight), min(1024, $::rootwidth));
$::move or $::stepswidth = $::rootwidth <= 640 ? 0 : 160;
($::logowidth, $::logoheight) = $::rootwidth <= 640 ? (0, 0) : (500, 40);
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 80a6597c9..25be3e91c 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -111,7 +111,7 @@ sub selectLanguage {
if (!$o->{keyboard} || $o->{keyboard}{unsafe}) {
$o->{keyboard} = keyboard::from_usb() || keyboard::lang2keyboard($o->{locale}{lang});
$o->{keyboard}{unsafe} = 1;
- keyboard::setup($o->{keyboard}) if !$::live;
+ keyboard::setup($o->{keyboard});
}
$o->charsetChanged;
@@ -171,7 +171,7 @@ sub doPartitionDisksBefore {
eval { fs::umount("$o->{prefix}/proc") };
eval { fs::umount_all($o->{fstab}, $o->{prefix}) };
eval { sleep 1; fs::umount_all($o->{fstab}, $o->{prefix}) } if $@; #- HACK
- } if $o->{fstab} && !$::testing && !$::live;
+ } if $o->{fstab} && !$::testing;
}
#------------------------------------------------------------------------------
diff --git a/perl-install/live_install b/perl-install/live_install
deleted file mode 100755
index 937661a7d..000000000
--- a/perl-install/live_install
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-if [ "$UID" -ne 0 ]; then
- echo >&2 "you need to be root to start live install"
- exit 3
-fi
-
-if [ -x ./Mandrake/mdkinst/usr/bin/perl-install/live_install2 ]; then
- dir=`pwd`/Mandrake/mdkinst
-elif [ -x ../../../../../Mandrake/mdkinst/usr/bin/perl-install/live_install2 ]; then
- dir=`pwd`/../../..
-else
- echo >&2 "unable to get a working live system to start, check your working directory"
- exit 2
-fi
-
-/bin/rm -rf /tmp/image
-/bin/mkdir -m 0700 /tmp/image || exit 1
-/bin/rm -rf /tmp/drakx
-/bin/mkdir -m 0700 /tmp/drakx || exit 2
-
-for i in Mandrake RPMS misc boot images VERSION
-do
- /bin/ln -sf "$dir/../../$i" "/tmp/image/$i"
-done
-
-/bin/cp -a "$dir/../../Mandrake/mdkinst" "/tmp/drakx"
-
-if [ -x "/tmp/drakx/mdkinst/usr/bin/perl-install/live_install2" ]; then
- # get correct fonts for DrakX.
- if [ -n "$DISPLAY" ]; then
- xset +fp /tmp/drakx/mdkinst/usr/X11R6/lib/X11/fonts/
- xset fp rehash
- fi
-
- # avoid pollution for environment
- unset LC_MONETARY LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME LC_COLLATE LANGUAGE LANG RPM_INSTALL_LANG
-
- # start DrakX, do not keep shell script in background else the CD is locked by it!!!
- cd /tmp/drakx/mdkinst/usr/bin/perl-install
- exec /usr/bin/perl ./live_install2
-fi
-
-echo >&2 "unable to get a working live system to start, check your working directory"
-exit 2
diff --git a/perl-install/live_install2 b/perl-install/live_install2
deleted file mode 100755
index b5a2ea877..000000000
--- a/perl-install/live_install2
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/perl
-
-my $dir = `pwd`;
-chomp $dir;
-$dir .= "/../../..";
-
-#- allow devfsd to enable a faster upgrade.
-system "modprobe loop";
-my $devfsd_pid = `/sbin/pidof devfsd`;
-$devfsd_pid > 0 and kill 15, $devfsd_pid;
-
-#- perl version of the install, we use directly the version we found,
-#- this means there SHOULD BE no module compiled for an older version of perl
-#- which will be used by DrakX.
-my ($version, $arch) = (glob "$dir/usr/lib/perl5/*/*/CORE/libperl.so")[0] =~ m|$dir/usr/lib/perl5/([^/]*)/([^/]*)/CORE/libperl.so|;
-
-#- keep it mind the ELF loader to use.
-$ENV{LD_LOADER} = "$dir/lib/ld-linux.so.2";
-
-$ENV{LOCPATH}="$dir/usr/share/locale";
-$ENV{GCONV_PATH}="$dir/usr/lib/gconv";
-$ENV{PERL5LIB} = join ":", map { "$dir/usr/lib/perl5/$_" } ("$version/$arch",
- "$version",
- "site_perl/$version/$arch",
- "site_perl/$version",
- "site_perl",
- "vendor_perl/$version/$arch",
- "vendor_perl/$version",
- "vendor_perl",
- );
-$ENV{LD_LIBRARY_PATH} = "$dir/usr/bin:$dir/bin:$dir/sbin:$dir/usr/sbin:$dir/usr/X11R6/bin:$dir/lib:$dir/usr/lib:$dir/usr/lib/perl5/$version/$arch/CORE";
-$ENV{PATH} = join(":", map { "$dir/$_" } split ":", "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin") . ":$ENV{PATH}";
-$ENV{SHARE_PATH} = "$dir/usr/share";
-$ENV{RPMRC_FILE} = "$dir/usr/lib/rpm/rpmrc";
-$ENV{GTK_DATA_PREFIX} = "$dir/usr";
-$ENV{GTK_EXE_PREFIX} = "$dir/usr";
-$ENV{GDK_IMLIB_PATH} = "$dir/usr/lib";
-
-system $ENV{LD_LOADER}, "../perl", "-i", "-pe", "s,^(.*macrofiles[^/]*)(.*),\$1$dir/usr/lib/rpm/macros:\$2,", $ENV{RPMRC_FILE};
-system $ENV{LD_LOADER}, "../perl", "./install2", "--live", @ARGV;
-
-#- at this point, unwind above else they will not run correctly (wrong ld-linux.so.2)
-delete $ENV{GTK_EXE_PREFIX};
-delete $ENV{RPMRC_FILE};
-delete $ENV{LOCPATH};
-delete $ENV{SHARE_PATH};
-delete $ENV{PATH};
-delete $ENV{LD_LIBRARY_PATH};
-delete $ENV{PERL5LIB};
-delete $ENV{LD_LOADER};
-
-$ENV{DISPLAY} and system "xset", "-fp", "/tmp/drakx/mdkinst/usr/X11R6/lib/X11/fonts/";
-foreach (qw(misc PEX Speedo Type1 mdk 75dpi 100dpi cyrillic)) {
- -d "/usr/X11R6/lib/X11/fonts/$_" or next;
- -e "/usr/X11R6/lib/X11/fonts/$_/fonts.dir" and next;
- chdir "/usr/X11R6/lib/X11/fonts/$_";
- system "mkfontdir";
-}
-$ENV{DISPLAY} and system "xset", "fp", "rehash";
-
-system "/bin/rm", "-rf", "/tmp/drakx";
-system "/bin/rm", "-rf", "/tmp/rhimage";
-
-#- restore devfsd if it was running.
-$devfsd_pid > 0 and system "/sbin/devfsd /dev";
-
-exec "/bin/sync";
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index ffe9a9555..27253b594 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -55,7 +55,7 @@ sub load {
if ($::testing || $::blank) {
log::l("i would load module $_ (" . join(" ", @{$options{$_}}) . ")") foreach @l;
- } elsif ($::isStandalone || $::live || $::move) {
+ } elsif ($::isStandalone || $::move) {
run_program::run('/sbin/modprobe', $_, @{$options{$_}})
or !run_program::run('/sbin/modprobe', '-n', $_) #- ignore missing modules
or die "insmod'ing module $_ failed" foreach @l;
diff --git a/perl-install/standalone/livedrake b/perl-install/standalone/livedrake
deleted file mode 100755
index 3d34d08d7..000000000
--- a/perl-install/standalone/livedrake
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/perl
-
-use lib qw(/usr/lib/libDrakX);
-
-use standalone; #- warning, standalone must be loaded very first, for 'explanations'
-
-use common;
-use interactive;
-use run_program;
-use c;
-
-my $in = 'interactive'->vnew('su');
-
-my $cd_mntpoint = "/mnt/cdrom";
-
-while (! -x "$cd_mntpoint/Mandrake/mdkinst/usr/bin/perl-install/live_install") {
- ejectCdrom();
- $in->ask_okcancel(N("Change Cd-Rom"),
-N("Please insert the Installation Cd-Rom in your drive and press Ok when done.
-If you don't have it, press Cancel to avoid live upgrade."), 1) or $in->exit(0);
- run_program::run("mount", "/mnt/cdrom");
-}
-
-if (-x "$cd_mntpoint/Mandrake/mdkinst/usr/bin/perl-install/live_install") {
- chdir "/$cd_mntpoint/Mandrake/mdkinst/usr/bin/perl-install/";
- $::testing or exec "./live_install";
-}
-
-$in->ask_warn('', N("Unable to start live upgrade !!!\n"));
-$in->exit(1);
-
-sub ejectCdrom {
- my ($cdrom) = @_;
- $cdrom or cat_("/proc/mounts") =~ m|(/dev/\S+)\s+/mnt/cdrom\s| and $cdrom = $1;
- $cdrom or cat_("/etc/fstab") =~ m|(/dev/\S+)\s+/mnt/cdrom\s| and $cdrom = $1;
- my $f = eval { $cdrom && detect_devices::tryOpen($cdrom) } or return;
- run_program::run("umount", "/mnt/cdrom");
- ioctl $f, c::CDROM_LOCKDOOR(), 0;
- ioctl $f, c::CDROMEJECT(), 1;
-}