From 96a44ec69287273eaa346a8ebc3dafea651a4d1e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 24 Nov 1999 16:45:10 +0000 Subject: no_comment --- perl-install/Makefile | 3 +- perl-install/Makefile.drakxtools | 2 +- perl-install/Xconfigurator.pm | 2 +- perl-install/c/stuff.xs.pm | 4 + perl-install/detect_devices.pm | 2 +- perl-install/install2 | 2 +- perl-install/install2.pm | 5 +- perl-install/install_any.pm | 3 + perl-install/install_steps.pm | 2 +- perl-install/install_steps_auto_install.pm | 2 +- perl-install/keyboard.pm | 4 +- perl-install/modules.pm | 160 +++++++++++++++++++++++------ perl-install/my_gtk.pm | 8 +- perl-install/partition_table_raw.pm | 1 + perl-install/run_program.pm | 4 +- perl-install/share/compssList | 4 +- 16 files changed, 160 insertions(+), 48 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Makefile b/perl-install/Makefile index f17a8c8e9..2af54a297 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -30,9 +30,10 @@ clean: find . -name "*~" -o -name ".#*" -o -name "TAGS" -o -name "*.old" | xargs rm -f tar-drakxtools: clean + $(MAKE) -C ../tools clean cd .. ; rm -rf drakxtools ; cp -af perl-install drakxtools ; cp -af tools/ddcprobe drakxtools cd ../drakxtools ; rm -rf install* ForMakefile.pm pkgs.pm ftp.pm t.pm standalone/CVS ; mv Makefile.drakxtools Makefile ; mv -f standalone/* . - cd .. ; tar cfy drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile MonitorsDB Newt c ddcprobe po pci_probing resize_fat diskdrake diskdrake.rc XFdrake mousedrake *.pm) + cd .. ; tar cfy drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile MonitorsDB Newt c ddcprobe po pci_probing resize_fat diskdrake diskdrake.rc XFdrake mousedrake lspcidrake *.pm) cd .. ; rm -rf drakxtools $(DIRS): diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools index 51d0f21a7..67af371bb 100644 --- a/perl-install/Makefile.drakxtools +++ b/perl-install/Makefile.drakxtools @@ -16,7 +16,7 @@ $(DIRS): install: install -d $(BINDEST) $(ETCDEST) $(SBINDEST) $(LIBDEST) $(X11DEST) $(DIRS:%=$(LIBDEST)/%) - install diskdrake XFdrake mousedrake $(SBINDEST) + install diskdrake XFdrake mousedrake lspcidrake $(SBINDEST) install -s ddcprobe/ddcxinfos $(SBINDEST) for i in *.pm ; do perl -pe '$$_ = "\n" if /\s*use\s+(diagnostics|vars|strict)/' $$i > $(LIBDEST)/$$i ; done diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index ea988b777..7f8749cce 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -299,7 +299,7 @@ sub testFinalConfig($;$) { my @l = "X"; @l = ($o->{card}{prog}, "-xf86config", $tmpconfig) if $::testing; chroot $prefix if $prefix; - exec @l, ":9" or exit 'true'; + exec @l, ":9" or c::_exit(0); } do { sleep 1 } until c::Xtest(":9") || waitpid($pid, c::WNOHANG()); diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 2f4d4efe6..93a9e8ab3 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -106,6 +106,10 @@ lseek_sector(fd, sector, offset) void setsid() +void +_exit(status) + int status + int detectSMP() diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index a6ce0575b..cea04aebc 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -33,7 +33,7 @@ sub get { [ \&hasDAC960, \&getDAC960 ], [ \&hasCompaqSmartArray, \&getCompaqSmartArray ]; } -sub hds() { grep { $_->{type} eq 'hd' && !isRemovableDrive($_) } get(); } +sub hds() { grep { $_->{type} eq 'hd' && ($::isStandalone || !isRemovableDrive($_)) } get(); } sub zips() { grep { $_->{type} eq 'hd' && isZipDrive($_) } get(); } #-sub jazzs() { grep { $_->{type} eq 'hd' && isJazDrive($_) } get(); } sub cdroms() { grep { $_->{type} eq 'cdrom' } get(); } diff --git a/perl-install/install2 b/perl-install/install2 index 94b64f271..bc85bc793 100755 --- a/perl-install/install2 +++ b/perl-install/install2 @@ -28,4 +28,4 @@ $::isStandalone = 0; install2::main(@ARGV); -exec "true"; +c::_exit(0); diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 1f56fa6cf..d9b138f21 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -186,7 +186,7 @@ $o = $::o = { - base => [ qw(basesystem sed initscripts console-tools mkbootdisk utempter ldconfig chkconfig ntsysv setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep gzip hdparm info initscripts isapnptools kernel less ldconfig lilo logrotate losetup man mkinitrd mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash ash setserial shadow-utils sh-utils stat sysklogd tar termcap textutils time tmpwatch util-linux vim-minimal vixie-cron which perl-base) ], + base => [ qw(basesystem sed initscripts console-tools mkbootdisk utempter ldconfig chkconfig ntsysv setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep gzip hdparm info initscripts isapnptools kernel less ldconfig lilo logrotate losetup man mkinitrd mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash ash setserial shadow-utils sh-utils stat sysklogd tar termcap textutils time tmpwatch util-linux vim-minimal vixie-cron which perl-base msec) ], #-GOLD base => [ qw(basesystem sed initscripts console-tools mkbootdisk anacron utempter ldconfig chkconfig ntsysv mktemp setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep groff gzip hdparm info initscripts isapnptools kbdconfig kernel less ldconfig lilo logrotate losetup man mkinitrd mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash ash setconsole setserial shadow-utils sh-utils slocate stat sysklogd tar termcap textutils time tmpwatch util-linux vim-minimal vixie-cron which cpio perl) ], #- for the list of fields available for user and superuser, see @etc_pass_fields in install_steps.pm @@ -594,7 +594,8 @@ sub main { last if $o->{step} eq 'exitInstall'; } - substInFile { s|/sbin/mingetty tty1.*|/bin/bash --login| } "$o->{prefix}/etc/inittab" if $o->{security} < 1; + substInFile { s|/sbin/mingetty tty1.*|/bin/bash --login| } "$o->{prefix}/etc/inittab" if $o->{security} < 1; + run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security}); fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}); modules::write_conf("$o->{prefix}/etc/conf.modules", 'append'); diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 040d36baf..e08e121aa 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -45,6 +45,9 @@ sub getFile($) { if ($::o->{method} && $::o->{method} eq "ftp") { require 'ftp.pm'; *install_any::getFile = \&ftp::getFile; + } elsif ($::o->{method} && $::o->{method} eq "http") { + require 'http.pm'; + *install_any::getFile = \&http::getFile; } else { *install_any::getFile = sub($) { open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 0f58aacc8..dbeccd122 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -147,7 +147,7 @@ sub ask_mntpoint_s { sub rebootNeeded($) { my ($o) = @_; log::l("Rebooting..."); - exec "true"; + c::_exit(0); } sub choosePartitionsToFormat($$) { diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index 394bf4e70..4b2d9adcd 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -28,7 +28,7 @@ sub errorInStep { print "switch to console f2 for a shell\n"; print "press to return to reboot\n"; ; - exec "true"; + c::_exit(0); } 1; diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 90b4efa5f..a9ee6a7b1 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -41,8 +41,8 @@ my %keyboards = ( "es" => [ __("Spanish"), "es-latin1", "es" ], "fi" => [ __("Finnish"), "fi-latin1", "fi" ], "fr" => [ __("French"), "fr-latin1", "fr" ], - "ge_ru"=>[__("Georgian (\"Russian\" layout)","ge_ru-georgian_academy","ge_ru"], - "ge_la"=>[__("Georgian (\"Latin\" layout)","ge_la-georgian_academy","ge_la"], + "ge_ru"=>[__("Georgian (\"Russian\" layout)"),"ge_ru-georgian_academy","ge_ru"], + "ge_la"=>[__("Georgian (\"Latin\" layout)"),"ge_la-georgian_academy","ge_la"], "gr" => [ __("Greek"), "gr-8859_7", "gr" ], "hu" => [ __("Hungarian"), "hu-latin2", "hu" ], "il" => [ __("Israeli"), "il-8859_8", "il" ], diff --git a/perl-install/modules.pm b/perl-install/modules.pm index a2a0c228c..783b25e01 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -1,7 +1,5 @@ package modules; -use diagnostics; -use strict; use vars qw(%loaded %drivers); use common qw(:common :file); @@ -31,16 +29,17 @@ my @drivers_by_category = ( "ac3200" => "Ansel Communication AC3200", "acenic" => "AceNIC Gigabit Ethernet", "pcnet32" => "AMD PC/Net 32", - "apricot" => "Apricot 82596", - "atp" => "ATP", - "e2100" => "Cabletron E2100", - "tlan" => "Compaq Netelligent", +# "apricot" => "Apricot 82596", # now builtin the kernel +# "atp" => "ATP", # builtin the kernel + "cs89x0" => "CS89x0", "de4x5" => "Digital 425,434,435,450,500", "depca" => "Digital DEPCA and EtherWORKS", + "e2100" => "Cabletron E2100", "ewrk3" => "Digital EtherWORKS 3", "tulip" => "Digital 21040 (Tulip)", "de600" => "D-Link DE-600 pocket adapter", "de620" => "D-Link DE-620 pocket adapter", + "dgrs" => "Digi International RightSwitch", "epic100" => "EPIC 100", "hp100" => "HP10/100VG any LAN ", "hp" => "HP LAN/AnyLan", @@ -59,25 +58,43 @@ my @drivers_by_category = ( "ni65" => "NI 6510", "rtl8139" => "RealTek RTL8129/8139", "es3210" => "Racal-Interlan ES3210", - "rcpci45" => "RedCreek PCI45 LAN", +# "rcpci" => "RedCreek Virtual Private Network", # TODO "epic100" => "SMC 83c170 EPIC/100", "sktr" => "Syskonnect Token ring adaptor", "smc9194" => "SMC 9000 series", "smc-ultra" => "SMC Ultra", "smc-ultra32" => "SMC Ultra 32", - "sunhme" => "Sun Happy Meal", - "tr" => "IBM TR Auto LANstreamer", +# "sunhme" => "Sun Happy Meal", # not there anymore? + "tlan" => "Compaq Netelligent", "via-rhine" => "VIA Rhine", +# "wavelan" => "AT&T WaveLAN & DEC RoamAbout DS", # TODO "wd" => "WD8003, WD8013 and compatible", "yellowfin" => "Symbios Yellowfin G-NIC", + + "82596" => "82596", + "8390" => "8390", + "dmfe" => "dmfe", + "dummy" => "dummy", + "fmv18x" => "fmv18x", + "ibmtr" => "Token Ring Tropic", + "olympic" => "olympic", + "plip" => "PLIP (parallel port)", + "rl100a" => "rl100a", + "sb1000" => "sb1000", + "sbni" => "sbni", + "sis900" => "sis900", + "nfs" => "Network File System (nfs)", + "lockd" => "lockd", + "sunrpc" => "sunrpc", }], [ 'scsi', { + "DAC960" => "Mylex DAC960", "aha152x" => "Adaptec 152x", "aha1542" => "Adaptec 1542", "aha1740" => "Adaptec 1740", "aic7xxx" => "Adaptec 2740, 2840, 2940", "advansys" => "AdvanSys Adapters", - "dpt" => "Distributed Tech SmartCache/Raid I-IV Controller", +# "dpt" => "Distributed Tech SmartCache/Raid I-IV Controller", # not there anymore? "in2000" => "Always IN2000", "AM53C974" => "AMD SCSI", "megaraid" => "AMI MegaRAID", @@ -97,8 +114,7 @@ my @drivers_by_category = ( "NCR53c406a" => "NCR 53c406a", "53c7,8xx" => "NCR 53c7xx", "ncr53c8xx" => "NCR 53C8xx PCI", - "pci2000" => "Perceptive Solutions PCI-2000", - "pas16" => "Pro Audio Spectrum/Studio 16", +# "pci2000" => "Perceptive Solutions PCI-2000", # TODO "qlogicfas" => "Qlogic FAS", "qlogicisp" => "Qlogic ISP", "seagate" => "Seagate ST01/02", @@ -107,12 +123,25 @@ my @drivers_by_category = ( "u14-34f" => "UltraStor 14F/34F", "ultrastor" => "UltraStor 14F/24F/34F", "wd7000" => "Western Digital wd7000", + + "a100u2w" => "a100u2w", + "atp870u" => "atp870u", + "dc395x_trm" => "dc395x_trm", + "ide-scsi" => "ide-scsi", + "imm" => "Iomega Zip (new driver)", + "psi240i" => "psi240i", + "qlogicfc" => "qlogicfc", + "sim710" => "sim710", + "st" => "st", + "sym53c416" => "sym53c416", + "tmscsim" => "tmscsim", }], [ 'cdrom', { "sbpcd" => "SoundBlaster/Panasonic", "aztcd" => "Aztech CD", - "bpcd" => "Backpack CDROM", +# "bpcd" => "Backpack CDROM", # not there anymore? "gscd" => "Goldstar R420", + "isp16" => "ISP16/MAD16/Mozart", "mcd" => "Mitsumi", "mcdx" => "Mitsumi (alternate)", "optcd" => "Optics Storage 8000", @@ -120,6 +149,7 @@ my @drivers_by_category = ( "sjcd" => "Sanyo", "cdu31a" => "Sony CDU-31A", "sonycd535" => "Sony CDU-5xx", + "isofs" => "iso9660", }], [ 'sound', { "alsa" => "ALSA sound module, many sound cards", @@ -129,29 +159,90 @@ my @drivers_by_category = ( "esssolo1" => "ESS Technology ES1969 Solo-1 Audiodrive", "maestro" => "Maestro", "nm256" => "Neomagic MagicMedia 256AV", + "pas16" => "Pro Audio Spectrum/Studio 16", "via82cxxx" => "VIA VT82C686_5", "sonicvibes" => "S3 SonicVibes", }], +[ 'pcmcia', { + "ide_cs" => "ide_cs", + "fmvj18x_cs" => "fmvj18x_cs", + "fdomain_cs" => "fdomain_cs", + "netwave_cs" => "netwave_cs", + "serial_cs" => "serial_cs", + "wavelan_cs" => "wavelan_cs", + "pcnet_cs" => "pcnet_cs", + "aha152x_cs" => "aha152x_cs", + "xirc2ps_cs" => "xirc2ps_cs", + "3c574_cs" => "3c574_cs", + "qlogic_cs" => "qlogic_cs", + "nmclan_cs" => "nmclan_cs", + "ibmtr_cs" => "ibmtr_cs", + "dummy_cs" => "dummy_cs", + "memory_cs" => "memory_cs", + "ftl_cs" => "ftl_cs", + "smc91c92_cs" => "smc91c92_cs", + "3c589_cs" => "3c589_cs", + "parport_cs" => "parport_cs", + "3c575_cb" => "3c575_cb", + "apa1480_cb" => "apa1480_cb", + "cb_enabler" => "cb_enabler", + "epic_cb" => "epic_cb", + "iflash2+_mtd" => "iflash2+_mtd", + "iflash2_mtd" => "iflash2_mtd", + "memory_cb" => "memory_cb", + "serial_cb" => "serial_cb", + "sram_mtd" => "sram_mtd", + "tulip_cb" => "tulip_cb", + +}], +[ 'pcmcia_everywhere', { + "pcmcia_core" => "PCMCIA core support", + "tcic" => "PCMCIA tcic controller", + "ds" => "PCMCIA card support", + "i82365" => "PCMCIA i82365 controller", +}], +[ 'raid', { + "linear" => "linear", + "raid0" => "raid0", + "raid1" => "raid1", + "raid5" => "raid5", +}], +[ 'mouse', { + "busmouse" => "busmouse", + "msbusmouse" => "msbusmouse", + "serial" => "serial", + "qpmouse" => "qpmouse", + "atixlmouse" => "atixlmouse", + + "usb-uhci", "USB (uhci)", + "usb-ohci", "USB (ohci)", + "usb-ohci-hcd", "USB (ohci-hcd)", +}], +[ 'fs', { + "smbfs" => "Windows SMB", + "fat" => "fat", + "msdos" => "msdos", + "romfs" => "romfs", + "sysv" => "sysv", + "ufs" => "ufs", + "umsdos" => "umsdos", + "vfat" => "vfat", +}], +[ 'other', { + "sg" => "sg", + "loop" => "Loopback device", + "lp" => "Parallel Printer", + "ide-floppy" => "ide-floppy", + "ide-tape" => "ide-tape", + "nbd" => "nbd", +}], ); +my %scsi_raid; @scsi_raid{qw(DAC960 dpt megaraid cpqarray gdth ips ppa eata eata_pio eata_dma st imm)} = (); + my @drivers_fields = qw(text type); -%drivers = ( - "plip" => [ "PLIP (parallel port)", 'net' ], - "ibmtr" => [ "Token Ring", 'net' ], - "DAC960" => [ "Mylex DAC960", 'scsi' ], - "pcmcia_core" => [ "PCMCIA core support", 'pcmcia' ], - "ds" => [ "PCMCIA card support", 'pcmcia' ], - "i82365" => [ "PCMCIA i82365 controller", 'pcmcia' ], - "tcic" => [ "PCMCIA tcic controller", 'pcmcia' ], - "isofs" => [ "iso9660", 'fs' ], - "nfs" => [ "Network File System (nfs)", 'fs' ], - "smbfs" => [ "Windows SMB", 'fs' ], - "loop" => [ "Loopback device", 'other' ], - "lp" => [ "Parallel Printer", 'other' ], - "usb-uhci", [ "USB (uhci)", 'serial_usb' ], - "usb-ohci", [ "USB (ohci)", 'serial_usb' ], - "usb-ohci-hcd", [ "USB (ohci-hcd)", 'serial_usb' ], -); +%drivers = (); + foreach (@drivers_by_category) { my @l = @$_; my $l = pop @l; @@ -165,6 +256,15 @@ while (my ($k, $v) = each %drivers) { 1; +sub module_of_type($) { + my ($type) = @_; + if ($type eq 'scsi&cdrom') { + grep { $drivers{$_}{type} =~ /^(scsi|cdrom)$/ && !exists $scsi_raid{$_} } keys %drivers; + } else { + grep { $drivers{$_}{type} eq $type } keys %drivers; + } +} + sub text_of_type($) { my ($type) = @_; diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index af7ae44e0..99ef6f7b0 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -469,9 +469,11 @@ sub _ask_from_list { $list->moveto($_[0], 0, 0.5, 0); }; - $list->signal_connect(button_press_event => - ref $title && !@okcancel ? $leave : sub { &$leave if $_[1]{type} =~ /^2/ } - ); + + ref $title && !@okcancel ? + $list->signal_connect(button_release_event => $leave) : + $list->signal_connect(button_press_event => sub { &$leave if $_[1]{type} =~ /^2/ }); + $list->signal_connect(select_row => sub { my ($w, $row, undef, $e) = @_; $curr = $row; diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm index 74b9b6036..9f4ad341d 100644 --- a/perl-install/partition_table_raw.pm +++ b/perl-install/partition_table_raw.pm @@ -22,6 +22,7 @@ my @MBR_signatures = ( [ 'BootStar', 0x130, "BootStar:" ], [ 'DocsBoot', 0x148, 'DocsBoot' ], [ 'system_commander', 0x1ad, "SYSCMNDRSYS" ], + [ 'Be Os', 0x24, 'Boot Manager' ], [ 'os2', 0x1c2, "\xA" ], [ 'dos', 0xa0, "\x25\x03\x4E\x02\xCD\x13" ], [ 'dos', 0x60, "\xBB\x00\x7C\xB8\x01\x02\x57\xCD\x13\x5F\x73\x0C\x33\xC0\xCD\x13" ], #- nt's diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 593b270d8..40a853764 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -44,12 +44,12 @@ sub rooted { if (ref $name) { unless (exec { $name->[0] } $name->[1], @args) { log::l("exec of $name->[0] failed: $!"); - exec('false') or exit(1); + c::_exit(1); } } else { unless (exec $name, @args) { log::l("exec of $name failed: $!"); - exec('false') or exit(1); + c::_exit(1); } } diff --git a/perl-install/share/compssList b/perl-install/share/compssList index d891ece34..cbc589287 100644 --- a/perl-install/share/compssList +++ b/perl-install/share/compssList @@ -378,7 +378,7 @@ libungif-progs 3 0 2 libunicode 1 0 80 libxml 0 0 71 libxml-devel 3 0 71 -linuxconf 82 0 96 +linuxconf 87 80 86 linuxconf-devel 1 0 70 linux_logo 92 92 92 locales 96 96 96 @@ -436,7 +436,7 @@ lout 15 0 10 lout-doc 15 0 10 lpg 60 0 80 lpr 0 80 39 -lrzsz 12 0 10 +lrzsz 0 0 0 lslk 3 0 2 lsof 2 0 1 lynx 35 99 84 -- cgit v1.2.1