summaryrefslogtreecommitdiffstats
path: root/perl-install/services.pm
Commit message (Expand)AuthorAgeFilesLines
* xfs is *not* mandatory for Xorg to run (#32846)Pascal Rigaux2007-08-271-1/+1
* typo fix (Dotan Kamber)Thierry Vignaud2007-08-091-1/+1
* typo fixThierry Vignaud2007-08-091-1/+1
* (description) describe a few more services (cups, dm, haldaemon,Thierry Vignaud2007-08-061-0/+9
* re-sync after the big svn lossPascal Rigaux2007-04-251-17/+6
* fill in missing titles for banners and specify iconsThierry Vignaud2005-08-271-2/+2
* create enable() and disable() out of set_status()Olivier Blin2005-06-101-4/+14
* don't need prefixing with current packagePascal Rigaux2005-06-091-4/+4
* - introduce set_status(), restart_or_start() and service_exists()Olivier Blin2005-05-241-18/+33
* better english (writing style rather than spoken one)Thierry Vignaud2004-12-131-2/+2
* remove some unneeded ";", add some for normalization (as told by perl_checker)Pascal Rigaux2004-11-181-1/+1
* simplifyPascal Rigaux2004-10-141-3/+2
* simplifyPascal Rigaux2004-10-141-5/+4
* fixed encoding problem with the output of start/stop init scriptsPablo Saratxaga2004-10-051-1/+3
* - Lete the function "start_not_running_service()" really start the specified ...Till Kamppeter2004-09-011-0/+4
* - Restored wrong upload.Till Kamppeter2004-09-011-41/+360
* - Lete the function "start_not_running_service()" really start the specified ...Till Kamppeter2004-09-011-360/+41
* aspell's typo fixesThierry Vignaud2004-08-231-2/+2
* replaced XFree86 and XFree with Xorg (bugzilla #10531)Pascal Rigaux2004-08-051-2/+2
* for install, a service is on if there is at least one runlevel for which thePascal Rigaux2004-02-101-1/+1
* add a fam description (telling that GNOME & KDE uses it). closes part of bugz...Pascal Rigaux2004-01-081-0/+2
* perl_checker compliancePascal Rigaux2003-08-111-1/+0
* in drakxservices, display differently services handled by xinetd (bug #4516)Pascal Rigaux2003-08-061-23/+33
* create services_raw() which returns all the info out of "chkconfig --list"Pascal Rigaux2003-08-061-5/+18
* perl_checker compliancePascal Rigaux2003-08-061-1/+1
* remove stock icons (per IHM team request)Pascal Rigaux2003-08-051-1/+1
* switch from gtk2-perl to gtk2-perl-xsThierry Vignaud2003-07-091-1/+1
* increase gui coherency of drakxtools vs other gtk+ apps: use stock iconsThierry Vignaud2003-07-061-1/+1
* perl_checker adaptations + fixesPascal Rigaux2003-04-241-2/+2
* - fix packing on standalone mode (no horizontal scrolling)Thierry Vignaud2003-03-101-1/+1
* we do use $in !!!!Thierry Vignaud2003-03-061-1/+1
* in drakxservices, don't stop services if one is using the gtk frontend (since...Pascal Rigaux2003-03-041-1/+3
* perl_checker fixThierry Vignaud2003-02-271-1/+1
* in standalone mode, only display a service as enabled at boot timeThierry Vignaud2003-02-241-2/+8
* (ask_standalone_gtk): ensure popup is not destroyed more than oncePascal Rigaux2003-02-211-1/+1
* Gtk2::Label::set is deprecatedGuillaume Cottenceau2003-02-201-1/+1
* fix rawdevices description (bug #1677)Pascal Rigaux2003-02-161-1/+1
* use $::prefixPascal Rigaux2003-02-141-22/+21
* - set_help is deprecatedPascal Rigaux2003-02-131-0/+1
* (start_service_on_boot) prevent copying this styleThierry Vignaud2003-02-131-4/+2
* (do_not_start_service_on_boot) : simplify itThierry Vignaud2003-02-131-3/+1
* cleanup starts_on_boot()Pascal Rigaux2003-02-121-15/+3
* Scannerdrake vastly improvedTill Kamppeter2003-02-121-1/+8
* English proofreading by Stew BenedictsPablo Saratxaga2003-01-211-2/+2
* fix prefix usageThierry Vignaud2003-01-201-15/+12
* fix embeddingThierry Vignaud2003-01-161-1/+1
* use wrap_text (instead of handcoding it)Pascal Rigaux2002-12-131-10/+1
* drakxservices' gtk+-2 portThierry Vignaud2002-12-051-7/+7
* remove unused variables or rename them with an underscore (eg: $o becomes $_o)Pascal Rigaux2002-12-041-3/+3
* gtk2Guillaume Cottenceau2002-12-031-18/+18
l str">qw(ncyl ntrks nsect)}; my @pt; my @infos_up = unpack $format1 x $nb_primary, $info{infos}; my @partitions_up = unpack $format2 x $nb_primary, $info{partitions}; foreach (0..$nb_primary-1) { my $h = { flag => $infos_up[1 + 2 * $_], start_cylinder => $partitions_up[2 * $_], size => $partitions_up[1 + 2 * $_] }; fs::type::set_pt_type($h, $infos_up[2 * $_]); $h->{start} = $sector + $h->{start_cylinder} * $hd->cylinder_size; $h->{pt_type} && $h->{size} or $h->{$_} = 0 foreach keys %$h; push @pt, $h; } #- this code is completely broken by null char inside strings, it gets completely crazy :-) # my @pt = mapn { # my %h; # @h{@$fields1} = unpack $format1, $_[0]; # @h{@$fields2} = unpack $format2, $_[1]; # $h{start} = $sector + $h{start_cylinder} * $hd->cylinder_size(); # $h{pt_type} && $h{size} or $h{$_} = 0 foreach keys %h; # \%h; # } [ grep { $_ } split /(.{$size1})/o, $info{infos} ], [ grep { $_ } split /(.{$size2})/o, $info{partitions} ]; [ @pt ], \%info; } # write the partition table (and extended ones) # for each entry, it uses fields: start, size, pt_type, active sub write($$$;$) { my ($hd, $sector, $pt, $info) = @_; # my ($csize, $wdsize) = (0, 0); #- handle testing for writing partition table on file only! my $F; if ($::testing) { my $file = "/tmp/partition_table_$hd->{device}"; open $F, ">$file" or die "error opening test file $file"; } else { $F = partition_table::raw::openit($hd, 2) or die "error opening device $hd->{device} for writing"; c::lseek_sector(fileno($F), $sector, $offset) or return 0; } ($info->{infos}, $info->{partitions}) = map { join '', @$_ } list2kv map { $_->{start} % $hd->cylinder_size == 0 or die "partition not at beginning of cylinder"; # $csize += $_->{size} if $_->{pt_type} != 5; # $wdsize += $_->{size} if $_->{pt_type} == 5; $_->{flags} |= 0x10 if $_->{mntpoint} eq '/'; $_->{flags} |= 0x01 if !isSwap($_); local $_->{start_cylinder} = $_->{start} / $hd->cylinder_size - $sector; pack($format1, @$_{@$fields1}), pack($format2, @$_{@$fields2}); } @$pt; # $csize == $wdsize or die "partitions are not using whole disk space"; #- compute the checksum by building the buffer to write and call compute_crc. #- set csum to 0 so compute_crc will give the right csum value. $info->{csum} = 0; $info->{csum} = compute_crc(pack($main_format, @$info{@$main_fields})); syswrite $F, pack($main_format, @$info{@$main_fields}), psizeof($main_format) or return 0; common::sync(); 1; } sub info { my ($hd) = @_; #- take care of reduction of the number of cylinders, avoid loop of reduction! unless ($hd->{geom}{totalcylinders} > $hd->{geom}{cylinders}) { $hd->{geom}{totalcylinders} = $hd->{geom}{cylinders}; $hd->{geom}{cylinders} -= 2; #- rebuild some constants according to number of cylinders. $hd->{totalsectors} = $hd->{geom}{heads} * $hd->{geom}{sectors} * $hd->{geom}{cylinders}; } #- build a default suitable partition table, #- checksum will be built when writing on disk. #- note third partition is ALWAYS of type Whole disk. my $info = { info => "DiskDrake partition table", rspeed => 5400, pcylcount => $hd->{geom}{totalcylinders}, sparecyl => 0, ilfact => 1, ncyl => $hd->{geom}{cylinders}, nacyl => $hd->{geom}{totalcylinders} - $hd->{geom}{cylinders}, ntrks => $hd->{geom}{heads}, nsect => $hd->{geom}{sectors}, magic => $magic, }; $info; } sub initialize { my ($hd) = @_; my $pt = { raw => [ ({}) x $nb_primary ], info => info($hd) }; #- handle special case for partition 2 which is whole disk. $pt->{raw}[2] = { pt_type => 5, #- the whole disk type. flags => 0, start_cylinder => 0, size => $hd->{geom}{cylinders} * $hd->cylinder_size, }; $hd->{primary} = $pt; bless $hd, 'partition::sun'; } 1;