summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
Commit message (Expand)AuthorAgeFilesLines
* remember to update mount options description on util-linux updateThierry Vignaud2003-06-241-0/+1
* stricter regexp when looking /dev/xxx otherwise it is used also for nfs namesPascal Rigaux2003-06-061-2/+2
* make perl_checker a happy botPascal Rigaux2003-06-051-1/+1
* don't use description of fstab options from manpage mount(8), inline them in ...Pascal Rigaux2003-06-051-28/+35
* perl_checker adaptations + fixesPascal Rigaux2003-04-241-1/+1
* another perl_checker optional parameter compliancePascal Rigaux2003-04-171-5/+5
* new perl_checker compliancePascal Rigaux2003-04-171-38/+40
* - add get_info_from_fstab()Pascal Rigaux2003-02-271-1/+9
* thx rekcehc_lrepGuillaume Cottenceau2003-02-201-1/+1
* to workaround perl bug removing UTF8 flag when passing scalars to die's, passGuillaume Cottenceau2003-02-191-10/+10
* - more precise message when formatting / fsck'ing / mounting partitionsPascal Rigaux2003-02-101-12/+19
* use "if any" instead of "if grep", and various other occurences of "any", "ev...Pascal Rigaux2003-01-071-5/+6
* (mount): do not fsck.ext2 when mounting readonlyPascal Rigaux2003-01-061-9/+13
* (add_options): drop (unused, use mount_options_unpack + mount_options_pack in...Pascal Rigaux2002-12-131-19/+0
* remove unused variables or rename them with an underscore (eg: $o becomes $_o)Pascal Rigaux2002-12-041-2/+2
* use if_() where possible (as reported by perl_checker)Pascal Rigaux2002-12-041-1/+1
* one need run_program::raw() to use optionsPascal Rigaux2002-12-031-8/+8
* formatting timeout is now 1 hourPascal Rigaux2002-12-021-8/+8
* remove the duplicate mke2fs (fixes buggy 1.225 change)Pascal Rigaux2002-12-021-1/+0
* use append_to_file()Pascal Rigaux2002-12-021-3/+3
* perl_checker adaptationsPascal Rigaux2002-11-271-2/+2
* - add/remove spaces to make perl_checker happyPascal Rigaux2002-11-141-2/+2
* - replace ... =~ 'foo' with ... =~ /foo/Pascal Rigaux2002-11-111-2/+2
* replace "_" with "N" and "__" with "N_"Pascal Rigaux2002-11-061-11/+11
* (format_ext2): better error message when it is called from format_ext3Pascal Rigaux2002-11-051-0/+1
* drop "notail" when filesystem is not reiserfsPascal Rigaux2002-09-301-0/+2
* - have ntfs "ro" by defaultPascal Rigaux2002-09-101-2/+3
* set umask=0 for ntfs partitions (currently only used when user sets the mount...Pascal Rigaux2002-09-051-1/+1
* revert add2hash_ username=% to add2hash (it breaks diskdrake --smb notPascal Rigaux2002-09-041-1/+1
* handle no options in fs::mount (is it really needed?... it should not!)Pascal Rigaux2002-09-041-1/+1
* use add2hash_ for setting "username=%" otherwise it causes havoc in auto_inst...Pascal Rigaux2002-08-281-1/+1
* - read_fstab, write_fstab: add the possibility to not change credentialsPascal Rigaux2002-08-281-17/+12
* remove deprecated comment (supermount *does* handle auto type nowadays)Pascal Rigaux2002-08-281-1/+1
* (set_default_options): use $is_removable to know if it is removable instead ofPascal Rigaux2002-08-281-1/+1
* create detect_devices::suggest_mount_point and use it instead of doing it in ...Pascal Rigaux2002-08-281-15/+4
* use mkdir_p instead of mkdirPascal Rigaux2002-08-281-2/+2
* use new function part2device() to have the file from {device} (fixes mounting...Pascal Rigaux2002-08-281-8/+14
* default option username=% for smbPascal Rigaux2002-08-281-0/+3
* (prepare_write_fstab): use mkdir_p instead of mkdir to handle mount points li...Pascal Rigaux2002-08-261-1/+1
* fix checking the return value of fsck.jfsPascal Rigaux2002-08-191-1/+4
* backend davfs (WebDAV) supportPascal Rigaux2002-08-131-2/+5
* (prepare_write_fstab): no need to read the fstab once again before writing si...Pascal Rigaux2002-08-111-12/+2
* make sure fsck is called for ext3 partition (due to possible kernel panic onFrancois Pons2002-08-081-8/+3
* "LABEL=xxx" in fstab handlingPascal Rigaux2002-08-071-4/+12
* - call fsck.jfs before mounting read-write (otherwise mount simply fails)Pascal Rigaux2002-07-301-5/+15
* fix mke2fs on loopbackPascal Rigaux2002-07-291-2/+2
* - use $::prefix for reading/writing (it was missing for writing)Pascal Rigaux2002-07-291-1/+1
* noreturn is now exported, no need to MDK::Common::Various::noreturn()Pascal Rigaux2002-07-251-1/+1
* for greater symmetry with smb, drop isNfs in favour of isThisFs('nfs', ...)Pascal Rigaux2002-07-071-3/+3
* supermount now handles fs=auto, using it :)Pascal Rigaux2002-07-061-6/+0
------------- sub default_theme { my ($o) = @_; $::move ? '/usr/share/themes/Galaxy/gtk-2.0/gtkrc' : $o->{meta_class} eq 'firewall' ? 'mdk-Firewall' : $o->{simple_themes} || $o->{vga16} ? 'blue' : 'galaxy'; } sub install_theme { my ($o) = @_; load_rc($o, $o->{theme} ||= default_theme($o)); load_font($o); gtkset_background(@background) if !$::move; } #------------------------------------------------------------------------------ sub create_help_window { my ($o) = @_; my $w; if ($w = $o->{help_window}) { $w->{window}->foreach(sub { $_[0]->destroy }, undef); } else { $w = $o->{help_window} = bless {}, 'ugtk2'; $w->{rwindow} = $w->{window} = Gtk2::Window->new('toplevel'); $w->{rwindow}->set_uposition($::rootwidth - $::helpwidth, $::rootheight - $::helpheight); $w->{rwindow}->set_size_request($::helpwidth, $::helpheight); $w->{rwindow}->set_title('skip'); }; gtkadd($w->{window}, create_scrolled_window($o->{help_window_text} = Gtk2::TextView->new)); $w->show; } #------------------------------------------------------------------------------ my %steps; sub create_steps_window { my ($o) = @_; return if $::stepswidth == 0; $o->{steps_window} and $o->{steps_window}->destroy; my $w = bless {}, 'ugtk2'; $w->{rwindow} = $w->{window} = Gtk2::Window->new('toplevel'); $w->{rwindow}->set_uposition(lang::text_direction_rtl() ? ($::rootwidth - $::stepswidth - 8) : 8, 150); $w->{rwindow}->set_size_request($::stepswidth, -1); $w->{rwindow}->set_name('Steps'); $w->{rwindow}->set_title('skip'); $steps{$_} ||= gtkcreate_pixbuf("steps_$_") foreach qw(on off); my $category = sub { gtkset_markup(Gtk2::Label->new, $o->{doc} ? $_[0] : '<span foreground="gray81">' . $_[0] . '</span>') }; gtkpack__(my $vb = Gtk2::VBox->new(0, 3), $steps{inst} = $category->(N("System installation")), ''); foreach (grep { !eval $o->{steps}{$_}{hidden} } @{$o->{orderedSteps}}) { $_ eq 'setRootPassword' and gtkpack__($vb, '', '', $steps{conf} = $category->(N("System configuration")), ''); $steps{steps}{$_} = { img => gtkcreate_img('steps_off.png'), txt => Gtk2::Label->new(translate($o->{steps}{$_}{text})) }; gtkpack__($vb, gtkpack__(Gtk2::HBox->new(0, 7), $steps{steps}{$_}{img}, $steps{steps}{$_}{txt})); } gtkadd($w->{window}, $vb); $w->show; $o->{steps_window} = $w; } sub update_steps_position { my ($o) = @_; return if !$steps{steps}; my $last_step; foreach (@{$o->{orderedSteps}}) { exists $steps{steps}{$_} or next; if ($o->{steps}{$_}{entered} && !$o->{steps}{$_}{done}) { $steps{steps}{$_}{img}->set_from_pixbuf($steps{on}); $last_step and $steps{steps}{$last_step}{img}->set_from_pixbuf($steps{off}); return; } $last_step = $_; } } #------------------------------------------------------------------------------ sub create_logo_window { my ($o) = @_; return if $::logowidth == 0 || $::move; gtkdestroy($o->{logo_window}); my $w = bless {}, 'ugtk2'; $w->{rwindow} = $w->{window} = Gtk2::Window->new('toplevel'); # $w->{rwindow}->set_position(0, 0); $w->{rwindow}->set_size_request($::logowidth, $::logoheight); $w->{rwindow}->set_name("logo"); $w->{rwindow}->set_title('skip'); $w->show; my $file = $o->{meta_class} eq 'firewall' ? "logo-mandrake-Firewall.png" : "logo-mandrake.png"; -r $file or $file = "$ENV{SHARE_PATH}/$file"; -r $file and gtkadd($w->{window}, gtkcreate_img($file)); $o->{logo_window} = $w; } #------------------------------------------------------------------------------ sub init_gtk { my ($o) = @_; symlink("/tmp/stage2/etc/$_", "/etc/$_") foreach qw(gtk-2.0 pango fonts); if ($o->{vga16}) { #- inactivate antialias in VGA16 because it makes fonts look worse output('/tmp/fonts.conf', q(<fontconfig> <include>/etc/fonts/fonts.conf</include> <match target="font"><edit name="antialias"><bool>false</bool></edit></match> </fontconfig> )); $ENV{FONTCONFIG_FILE} = '/tmp/fonts.conf'; } Gtk2->init; Gtk2->set_locale; } #------------------------------------------------------------------------------ sub init_sizes() { ($::rootwidth, $::rootheight) = (Gtk2::Gdk->screen_width, Gtk2::Gdk->screen_height); #- ($::rootheight, $::rootwidth) = (min(768, $::rootheight), min(1024, $::rootwidth)); $::stepswidth = $::rootwidth <= 640 ? 0 : 200 if !$::move; ($::logowidth, $::logoheight) = $::rootwidth <= 640 ? (0, 0) : (500, 40); ($::helpwidth, $::helpheight) = ($::rootwidth - $::stepswidth, $::move && 15); ($::windowwidth, $::windowheight) = ($::rootwidth - $::stepswidth, $::rootheight - $::helpheight - $::logoheight); ($::real_windowwidth, $::real_windowheight) = (576, 418); $::move and $::windowwidth -= 100; } #------------------------------------------------------------------------------ sub createXconf { my ($file, $mouse_type, $mouse_dev, $_wacom_dev, $Driver) = @_; symlinkf(devices::make($mouse_dev), "/dev/mouse") if $mouse_dev ne 'none'; #- needed for imlib to start on 8-bit depth visual. symlink("/tmp/stage2/etc/imrc", "/etc/imrc"); symlink("/tmp/stage2/etc/im_palette.pal", "/etc/im_palette.pal"); #- remove "error opening security policy file" warning symlink("/tmp/stage2/etc/X11", "/etc/X11"); if ($Driver) { output($file, sprintf(<<'END', ($::globetrotter ? "" : 'Option "XkbDisable"'), $mouse_type, $Driver, $Driver eq 'fbdev' ? '"default"' : '"800x600" "640x480"')); Section "Files" FontPath "/usr/X11R6/lib/X11/fonts:unscaled" EndSection Section "InputDevice" Identifier "Keyboard" Driver "Keyboard" %s Option "XkbModel" "pc105" Option "XkbLayout" "" EndSection Section "InputDevice" Identifier "Mouse" Driver "mouse" Option "Protocol" "%s" Option "Device" "/dev/mouse" Option "ZAxisMapping" "4 5" EndSection Section "Monitor" Identifier "monitor" HorizSync 31.5-35.5 VertRefresh 50-70 EndSection Section "Device" Identifier "device" Driver "%s" EndSection Section "Screen" Identifier "screen" Device "device" Monitor "monitor" DefaultColorDepth 16 Subsection "Display" Depth 16 Modes %s EndSubsection EndSection Section "ServerLayout" Identifier "layout" Screen "screen" InputDevice "Mouse" "CorePointer" InputDevice "Keyboard" "CoreKeyboard" EndSection END } } 1;