summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/draknfs
blob: f1bd916ef31798e3b30bd74ad4a113c7f36950a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
#!/usr/bin/perl
#
# Copyright (C) 2005 by Mandriva aginies _ateuh_ mandriva.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

my $version = "0.3";

use strict;
use lib qw(/usr/lib/libDrakX);
use standalone;
use common;
use network::network;
use interactive;
use ugtk2 qw(:ask :wrappers :create :dialogs);

my $in = 'interactive'->vnew('su');
$in->do_pkgs->ensure_is_installed('nfs-utils', '/usr/sbin/rpc.nfsd') or return;

use constant COLUMN_DIR => 0;
use constant COLUMN_ACCESS => 1;
use constant COLUMN_RIGHT => 2;
use constant COLUMN_OPTIONS => 3;
use constant NUM_COLUMNS => 4;

my $CONF = "/etc/exports";
my @listshare;
my $root_squash = N("map root user as anonymous");
my $all_squash = N("map all users to anonymous user");
my $no_all_squash = N("No user UID mapping");
my $no_root_squash = N("allow real remote root access");
my @listuserid_data = split(", ", qq($root_squash, $all_squash, $no_all_squash, $no_root_squash));

my $userid_data = {
		   root_squash => $root_squash,
		   no_root_squash => $no_root_squash,
		   all_squash => $all_squash,
		   no_all_squash => $no_all_squash,
		  };

my @yesno = qw(yes no);

sub get_items() {
    my @items = (
		 [ "/_File", undef, undef, undef, '<Branch>', ],
		 [ "/_File/_Write conf", undef, \&write_conf, 1, '<StockItem>', 'gtk-execute' ],
		 [ "/_File/_Exit", undef, \&quit_all, 1, '<StockItem>', 'gtk-quit' ],

		 [ "/_NFS Server", undef, undef, undef, '<Branch>', ],
		 [ "/_NFS Server/_Restart", undef, \&restart_dialog, 1, '<StockItem>', 'gtk-execute' ],
		 [ "/_NFS Server/R_eload", undef, \&reload_dialog, 1, '<StockItem>', 'gtk-refresh' ],
		 );
    return @items;
}

sub quit_all() {
  ugtk2->exit;
}

sub restart_dialog() {
  wait_action("service nfs restart");
}

sub reload_dialog() {
  wait_action("service nfs reload");
}

sub wait_action {
    my ($cmd) = @_;
    my $w = $in->wait_message(N("NFS server"), N("Restarting/Reloading NFS server..."));
    run_program::get_stdout($cmd) !~ /unknown|error/ or err_dialog(N("Error!"), N("Error Restarting/Reloading NFS server")) and return;
    undef $w;
}

my %size_groups = map { $_ => Gtk2::SizeGroup->new('horizontal') } qw(label widget button);
my $label_and_widgets = sub {
  my ($label, $widget, $button) = @_;
  gtkpack_(Gtk2::HBox->new(0,0),
           0, gtkadd_widget($size_groups{label}, $label),
	   0, gtkadd_widget($size_groups{widget}, $widget),
	   0, gtkadd_widget($size_groups{button}, $button),
          );
};

my $fdwidget = sub {
  my ($data) = @_;
  my $fd = new Gtk2::FileSelection(N("Directory Selection"));
  $fd->set_modal(1);
  $fd->signal_connect("destroy", sub { $fd->hide });
  $fd->ok_button->signal_connect(clicked => sub {
				   my $file = $fd->get_filename;
				   -d $file or err_dialog(N("Error!"), N("Should be a directory.")) and return;
				   $data->set_text($file);
				   $fd->hide;
				 }, $fd);
  $fd->cancel_button->signal_connect(clicked => sub { $fd->hide });
  return $fd;
};

sub get_nfs_data() {
# /home/nis *(async,rw,no_root_squash)
# /home/nis/guibo/Build *(async,rw,no_root_squash)
  foreach (cat_($CONF)) {
    my ($dir, $access, $right, $options) = m!^(/\S+)\s+(\S*)\((\S*)\)\s+(\S*)!;
    $dir and push @listshare, {
			       dir => $dir,
			       access => $access,
			       right => $right,
			       options => $options,
			     };
  }
}

sub write_conf() {
  output($CONF, "# generated by drakhosts.pl\n");
  foreach my $a (@listshare) {
    append_to_file($CONF, "$a->{dir} $a->{access}($a->{right}) $a->{options}\n");
  }

}

my $help_access;
$help_access = N("<span weight=\"bold\">NFS clients</span> may be specified in a number of ways:


<span foreground=\"royalblue3\">single host:</span> a host either by an abbreviated name recognized be the resolver, fully qualified domain name, or an IP address


<span foreground=\"royalblue3\">netgroups:</span> NIS netgroups may be given as \@group.


<span foreground=\"royalblue3\">wildcards:</span> machine names may contain the wildcard characters * and ?. For instance: *.cs.foo.edu  matches all  hosts  in the domain cs.foo.edu.


<span foreground=\"royalblue3\">IP networks:</span> you can also export directories to all hosts on an IP (sub-)network simultaneously. for example, either `/255.255.252.0' or  `/22'  appended to the network base address result.
");

my $help_userid = N("<span weight=\"bold\">User ID options</span>


<span foreground=\"royalblue3\">map root user as anonymous:</span> map requests from uid/gid 0 to the anonymous uid/gid (root_squash).


<span foreground=\"royalblue3\">allow real remote root access:</span> turn off root squashing. This option is mainly useful for diskless clients (no_root_squash).


<span foreground=\"royalblue3\">map all users to anonymous user:</span> map all uids and gids to the anonymous  user (all_squash). Useful for NFS-exported public FTP directories, news spool directories, etc. The opposite option is no user UID mapping (no_all_squash), which is the default setting.


<span foreground=\"royalblue3\">anonuid and anongid:</span> explicitly set the uid and gid of the anonymous account.
");

my %adv_options = (
	sync => N("Synchronous access:"),
	secured => N("Secured Connection:"),
	ro => N("Read-Only share:"),
);
my $help_global = join("\n\n\n", N("<span weight=\"bold\">Advanced Options</span>"),
N("<span foreground=\"royalblue3\">%s:</span> this option requires that requests originate on an internet port less than IPPORT_RESERVED (1024). This option is on by default.", $adv_options{secured}),
N("<span foreground=\"royalblue3\">%s:</span> allow either only read or both read and write requests on this NFS volume. The default is to disallow any request which changes the filesystem. This can also be made explicit by using this option.", $adv_options{ro}),
N("<span foreground=\"royalblue3\">%s:</span> disallows the NFS server to violate the NFS protocol and to reply to requests before any changes made by these requests have been committed to stable storage (e.g. disc drive).", $adv_options{sync}),
);

sub create_pango_help_box {
  # perl code from draksec
  my ($help) = @_;
  my $text = Gtk2::TextView->new;
  use Gtk2::Pango;
  my %common_opts = ('left-margin' => '10', 'right-margin' => '10');
  gtktext_insert($text, [ map  {
    if (s!^/span>!!) {
      [ $_, \%common_opts ];
    } elsif (s!span !!) {
      my %tags = %common_opts;
      while (s!(\w+?)="(\w+?)"!!) {
	$tags{weight} ||= Gtk2::Pango->PANGO_WEIGHT_BOLD if $1 eq 'foreground';
	$tags{$1} = $2 eq "bold" ? Gtk2::Pango->PANGO_WEIGHT_BOLD : $2;
      }
      s/^>//;
      [ $_, \%tags ];
    } else {
      [ $_, \%common_opts ];
    }
  } split("<", formatAlaTeX($help)) ]);
  gtkset_size_request(create_scrolled_window($text), 350, 300);
}

sub help_b {
  my ($tittle, $help_data) = @_;
  gtksignal_connect(new Gtk2::Button->new(N("Information")), clicked => sub {
		      my $dialog = _create_dialog();
		      $dialog->set_transient_for($::main_window);
		      $dialog->set_title(N("Help"));
		      $dialog->set_modal(1);
		      gtkpack_($dialog->vbox,
			       1, create_pango_help_box($help_data),
			       0, gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub {
				   $dialog->destroy;
						    }
						   ),
			      );
		      $dialog->show_all;
		    }
		    );
}

sub get_access_list() {
  my $net = {};
  network::network::read_net_conf($net);
  my $interface ||= $net->{net_interface};
  my $ip_address = network::tools::get_interface_ip_address($net, $interface);
  my $domain = chomp_(`dnsdomainname`);
  my @o = split(/\./, $ip_address);
  my $ipnet;
  if ($ip_address) {
    $ipnet = $o[0] . "." . $o[1] . "." . $o[2] . ".0";
  } else { $ipnet = "ip_address" }
  my @all = split(", ", qq(*, *.$domain, $ipnet/8, $ipnet/24));
  return @all;
}

sub get_data_from_id {
    my ($id, $what) = @_;
    my $data;
    if ($what =~ /passwd/) {
	setpwent();
	($data) = (getpwuid($id))[0];
	endpwent();
    } else {
	setgrent();
	($data) = (getgrgid($id))[0];
	endgrent();
    }
    return $data;
}

sub get_user_or_group {
  my ($what) = @_;
  my $conf = "/etc/" . $what;
  my @data; local $_;
  foreach (cat_($conf)) {
    push @data, "$1 [$2]" if m/^([^#:]+):[^:]+:([^:]+):/ and $2 > 499;
  }
  push @data, " ";
  return sort(@data);
}


sub add_modify_entry {
  my ($treeview, $wanted) = @_;
  my $model = $treeview->get_model;
  my $selection = $treeview->get_selection;
  my $iter;
  my ($i, $dir, $access, $right, $options);
  my ($lr, $luserid, $lsecure, $lsync, $lr_data, $lsync_data, $lsecure_data);
  undef $i; undef $iter;

  $_ = Gtk2::Entry->new foreach $dir, $options;
  $_ = Gtk2::OptionMenu->new foreach $lr, $luserid, $lsecure, $lsync;

  $access = Gtk2::Combo->new;
#  $access = Gtk2::ComboBox->new_text;
  my @access_list = get_access_list();
#  foreach (@access_list) {
#    $_ and $access->append_text($_);
#  }
  $access->set_popdown_strings(@access_list);

  $luserid->set_popdown_strings(@listuserid_data);
  $lr->set_popdown_strings(@yesno);
  $lsync->set_popdown_strings(@yesno);
  $lsecure->set_popdown_strings(@yesno);

  my $file_dialog = $fdwidget->($dir);
  my $button = Gtk2::Button->new(N("Directory"));
  $button->signal_connect(clicked => sub { $file_dialog->show });

# test if modify or add a nfs share
  my $dialog = _create_dialog();
  $dialog->set_transient_for($::main_window);
  local $::main_window = $dialog;
  $dialog->set_title("Draknfs entry");
  $dialog->set_position('center');
  $dialog->set_modal(1);
  $dialog->set_resizable(1);

  my $anonuid = Gtk2::ComboBox->new_with_strings([ get_user_or_group('passwd') ]);
  my $anongid = Gtk2::ComboBox->new_with_strings([ get_user_or_group('group') ]);
  $_->set_wrap_width(3) foreach $anonuid, $anongid;

  if ($wanted =~ /modify/) {
    $iter = $selection->get_selected;
    $iter or info_dialog(N("Error"), N("Please add an NFS share to be able to modify it.")) and return;
    my $path = $model->get_path($iter);
    $i = ($path->get_indices)[0];
    $dir->set_text($listshare[$i]{dir});
    if (!member($listshare[$i]{access}, @access_list)) {
      $access->entry->append_text($listshare[$i]{access});
    }
#    $access->child->set_text($listshare[$i]{access});
#    $access->set_text($listshare[$i]{access});
    $access->entry->set_text($listshare[$i]{access});

    # list of all rigth in bracket
    #    $anongid, $anonuid, $lr, $luserid, $lsecure, $lsync;
    $right = $listshare[$i]{right};
    my @opts = split(/,/, $right);
    $_->set_text("") foreach $lr, $lsync, $anonuid, $anongid, $luserid, $lsecure;

    foreach my $opt (@opts) {
      if ($opt =~ m/(\bro\b|\brw\b)/) {
	if ($opt =~ /ro/) { $lr->set_text("yes") } else { $lr->set_text("no") }
      } elsif ($opt =~ m/\bsync\b|\basync\b/) {
	if ($opt =~ /sync/) { $lsync->set_text("yes") } else { $lsync->set_text("no") }
      } elsif ($opt =~ m/anongid=(\d+)/) {
        my $gdata = get_data_from_id($1, 'group') . " [$1]";
        $anongid->set_text($gdata);
      } elsif ($opt =~ m/anonuid=(\d+)/) {
        my $udata = get_data_from_id($1, 'passwd') . " [$1]";
        $anonuid->set_text($udata);
      } elsif ($opt =~ m/(no_root_squash|root_squash|all_squash|no_all_squash)/) {
	if ($opt =~ /^no_root_squash/) {
	  $luserid->set_text($userid_data->{no_root_squash});
	} elsif ($opt =~ /^root_squash/) {
	  $luserid->set_text($userid_data->{root_squash});
	} elsif ($opt =~ /^all_squash/) {
	  $luserid->set_text($userid_data->{all_squash});
	} elsif ($opt =~ /^no_all_squash/) {
	  $luserid->set_text($userid_data->{no_all_squash});
	}
      } elsif ($opt =~ m/(\bsecure\b|\binsecure\b)/) {
	if ($opt =~ /insecure/) { $lsecure->set_text("no") } else { $lsecure->set_text("yes") }
      } else { next }
    }
    foreach ($lsecure, $lsync) { if ($_->get_text =~ //) { $_->set_text("yes") } }
    $lr->get_text =~ // and $lr->set_text("no");
  }

  $luserid->signal_connect(changed => sub {
			     if ($luserid->get_text =~ /$userid_data->{root_squash}/) {
			       $_->set_sensitive(1) foreach $anongid, $anonuid;
			     } elsif ($luserid->get_text =~ /$userid_data->{all_squash}/) {
			       $_->set_sensitive(0) foreach $anongid, $anonuid;
			       $_->set_text("65534") foreach $anongid, $anonuid;
			     } else {
			       $_->set_text("") foreach $anongid, $anonuid;
			       $_->set_sensitive(0) foreach $anongid, $anonuid;
			     }
			   });

  if ($wanted =~ /add/) {
    # default choice root_squash and ro
    $luserid->set_text($userid_data->{no_all_squash});
    $lr->set_text("yes");
    $lsecure->set_text("yes");
    $lsync->set_text("no");
  }

  if ($luserid->get_text !~ /$userid_data->{root_squash}/) {
    $_->set_sensitive(0) foreach $anongid, $anonuid;
  }

  my $expender = Gtk2::Expander->new('Advanced options');
  $expender->add(gtkpack_(Gtk2::VBox->new,
                          0, $label_and_widgets->($adv_options{sync}, $lsync, help_b(N_("Advanced Options Help"), $help_global)),
                          0, $label_and_widgets->($adv_options{secured}, $lsecure, ""),
                          0, $label_and_widgets->($adv_options{ro}, $lr, ""),
			 ),
		);
  $expender->signal_connect(activate => sub {
			      gtkset_size_request($dialog, -1, -1);
			      gtkflush();
			    });

  gtkpack_($dialog->vbox,
	   0, gtkadd(Gtk2::Frame->new(N("NFS directory")),
		     gtkpack_(gtkset_border_width(Gtk2::VBox->new, 5),
			      0, $label_and_widgets->(N("Directory:"), $dir, $button),
			     ),
		     ),
	   0, gtkadd(Gtk2::Frame->new(N("Host access")),
                     gtkpack_(gtkset_border_width(Gtk2::VBox->new, 5),
			      0, $label_and_widgets->(N("Access:"), $access, help_b(N_("Hosts Access"), $help_access)),
			     ),
		    ),
	   0, gtkadd(Gtk2::Frame->new(N("User ID Mapping")),
                     gtkpack_(gtkset_border_width(Gtk2::VBox->new, 5),
			      0, $label_and_widgets->(N("User ID:"), $luserid, help_b(N_("Help User ID"), $help_userid)),
			      0, $label_and_widgets->(N("Anonymous user ID:"), $anonuid, ""),
			      0, $label_and_widgets->(N("Anonymous Group ID:"), $anongid, ""),
			     ),
		    ),
	   0, gtkadd(Gtk2::Frame->new(""),
                     gtkpack_(gtkset_border_width(Gtk2::VBox->new, 5),
			      0, $expender,
			     ),
		    ),
	   0, create_okcancel({
			       cancel_clicked => sub { $dialog->destroy },
			       ok_clicked => sub {
				 my ($anonu, $anong);
				 if ($anonuid->get_text) {
				   my ($uid) = $anonuid->get_text =~ /\[(\S*)\]/;
				   $anonu = "anonuid=" . $uid;
				 }
                                 if ($anongid->get_text) {
				     my ($gid) = $anongid->get_text =~ /\[(\S*)\]/;
				     $anong = "anongid=" . $gid;
				   }
				 if ($lsync->get_text =~ /yes/) { $lsync_data = "sync" } elsif ($lsync->get_text =~ /no/) { $lsync_data = "async" } else { undef $lsync_data }
				 if ($lr->get_text =~ /yes/) { $lr_data = "ro" } elsif ($lr->get_text =~ /no/) { $lr_data = "rw" } else { undef $lr_data }
				 if ($lsecure->get_text =~ /yes/) { $lsecure_data = "secure" } elsif ($lsecure->get_text =~ /no/) { $lsecure_data = "insecure" } else { undef $lsecure_data }
				 # test $luserid->get_text
				 my $luserid_toput;
				 if ($luserid->get_text =~ /$userid_data->{no_root_squash}/) {
				     $luserid_toput = "no_root_squash";
				     undef $anong; undef $anonu;
				 } elsif ($luserid->get_text =~ /$userid_data->{root_squash}/) {
				     $luserid_toput = "root_squash";
				 } elsif ($luserid->get_text =~ /$userid_data->{no_all_squash}/) {
				     $luserid_toput = "no_all_squash";
				     undef $anong; undef $anonu;
				 } elsif ($luserid->get_text =~ /$userid_data->{all_squash}/) {
				     $luserid_toput = "all_squash";
				     $anong = "anongid=65534";
				     $anonu = "anonuid=65534";
				 }

				 my $all_right = join(",", grep { defined $_ } $luserid_toput, $anonu, $anong, $lsync_data, $lsecure_data, $lr_data);
				 my $test_dir = $dir->get_text;
				 mkdir_p($test_dir) or err_dialog(N("Error!"), N("Can't create this directory.")) and return;
				 #my $test_access = $access->child->get_text;
				 my $test_access = $access->entry->get_text;
				 $test_access or err_dialog(N("Error!"), N("You must specify hosts access.")) and return;
				 if ($wanted =~ /add/) {
				   $iter = $model->append;
				   $i = "-1";
				   push @listshare, {
						     dir => $dir->get_text,
						     #access => $access->child->get_text,
						     access => $access->entry->get_text,
						     right => $all_right,
						     options => $options->get_text,
						    };
				 }
				 $listshare[$i]{right} = $all_right;
				 #$listshare[$i]{access} = $access->child->get_text;
				 $listshare[$i]{access} = $access->entry->get_text;
				 $listshare[$i]{dir} = $dir->get_text;
				 $listshare[$i]{options} = $options->get_text;
				 $model->set($iter,
					     COLUMN_DIR, $listshare[$i]{dir},
					     COLUMN_ACCESS, $listshare[$i]{access},
					     COLUMN_RIGHT, $all_right,
					     COLUMN_OPTIONS, $listshare[$i]{options},
					    );
				 $dialog->destroy;
#				 write_conf();
			       },
			      },
			     ),
	  );
  $dialog->show_all;
}

sub remove_entry {
  my ($widget, $treeview) = @_;
  my $model = $treeview->get_model;
  my $selection = $treeview->get_selection;
  my $iter = $selection->get_selected;
    if ($iter) {
      my $path = $model->get_path($iter);
      my $i = ($path->get_indices)[0];
      ask_okcancel("Remove entry ?", "Remove $listshare[$i]{dir}") or return;
      $model->remove($iter);
      splice @listshare, $i, 1;
    }
#  write_conf();
}

sub create_model() {
  get_nfs_data();
  my $model = Gtk2::ListStore->new("Glib::String", "Glib::String",  "Glib::String", "Glib::String");
  foreach my $a (@listshare) {
    my $iter = $model->append;
    $model->set($iter,
		COLUMN_DIR, $a->{dir},
		COLUMN_ACCESS, $a->{access},
		COLUMN_RIGHT, $a->{right},
		COLUMN_OPTIONS, $a->{options},
		);
	     }
  return $model;
}

# add colum to model
sub add_columns {
  my $treeview = shift;
  my $model = $treeview->get_model;
#  my @colsize = (120, 160, 120);
#  each_index {
#    my $renderer = Gtk2::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i);
#    $renderer->set_sort_column_id($::i);
#    $renderer->set_min_width($colsize[$::i]);
#    $treeview->append_column($renderer);
#  } N("Share Directory"), N("Hosts Wildcard"), N("General Options"), N("Custom Options");

  each_index {
    my $renderer = Gtk2::CellRendererText->new;
    $renderer->set(editable => 0);
    $renderer->signal_connect(edited => \&cell_edited, $model);
    $renderer->set_data(column => $::i);
    $treeview->insert_column_with_attributes(-1, $_, $renderer, 'text' => $::i);
  } N("Share Directory"), N("Hosts Wildcard"), N("General Options"), N("Custom Options");
}

sub cell_edited {
  my ($cell, $path_string, $new_text, $model) = @_;
  my $path = Gtk2::TreePath->new_from_string($path_string);
  my $column = $cell->get_data("column");
  my $iter = $model->get_iter($path);

  if ($column == COLUMN_DIR) {
    my $i = ($path->get_indices)[0];
    $listshare[$i]{dir} = $new_text;
    -d $new_text or err_dialog(N("Error!"), N("Please enter a directory to share.")) and return;
    $model->set($iter, $column, $listshare[$i]{dir});
  } elsif ($column == COLUMN_ACCESS) {
    my $i = ($path->get_indices)[0];
    $listshare[$i]{access} = $new_text;
    $model->set($iter, $column, $listshare[$i]{access});
  } elsif ($column == COLUMN_RIGHT) {
    err_dialog(N("Error!"), N("Please use the modify button to set right access.")) and return;
  } elsif ($column == COLUMN_OPTIONS) {
    my $i = ($path->get_indices)[0];
    $listshare[$i]{options} = $new_text;
    $model->set($iter, $column, $listshare[$i]{options});
  }
  write_conf();
}

###############
# Main Program
###############
# create model
my $model = create_model();

my $window = ugtk2->new("DrakNFS");
$::main_window = $window->{real_window};
$window->{rwindow}->set_size_request(550, 400) unless $::isEmbedded;
$window->{rwindow}->set_position('center') if !$::isEmbedded;
my $W = $window->{window};
$W->signal_connect(delete_event => sub { ugtk2->exit });

my $treeview = Gtk2::TreeView->new_with_model($model);
$treeview->set_rules_hint(1);
$treeview->get_selection->set_mode('single');
add_columns($treeview);

# double clic and popup modify window
$treeview->signal_connect(button_press_event => sub {
			    my (undef, $event) = @_;
			    my $selection = $treeview->get_selection;
			    my $iter = $selection->get_selected;
			    if ($iter) {
			      add_modify_entry($treeview, "modify") if $event->type eq '2button-press';
			    }
			  });

# create menu
my @items = get_items();
my $factory = Gtk2::ItemFactory->new('Gtk2::MenuBar', '<main>', undef);
$factory->create_items('menu', @items);
my $menu = $factory->get_widget('<main>');

my $okcancel = create_okcancel({
				cancel_clicked => sub { ugtk2->exit },
				ok_clicked => sub { &write_conf;
						    run_program::raw({ detach => 1 }, "service nfs reload");
						    ugtk2->exit },
			       },
			      );

# main interface
$W->add(gtkpack_(Gtk2::VBox->new(0,0),
		 0, $menu,
		 if_(!$::isEmbedded, 0, Gtk2::Banner->new('IC-NFS-48', N("DrakNFS manage NFS shares"))),
		 #if_($::isEmbedded, 0, Gtk2::Label->new("Here you can add, remove and alter NFS shares.")),
		 1, gtkpack_(gtkset_border_width(Gtk2::HBox->new, 0),
			     1, create_scrolled_window($treeview),
			     0, gtkpack_(create_vbox('start'),
					 0, gtksignal_connect(Gtk2::Button->new(N("Add")), clicked => sub {
								eval { add_modify_entry($treeview, "add") };
								my $err = $@;
								if ($err) {
								  err_dialog(N("Error"), N("Failed to add NFS share.") . "\n\n" . $err);
								}
							      }),
					 0, gtksignal_connect(Gtk2::Button->new(N("Modify")), clicked => sub {
								eval { add_modify_entry($treeview, "modify") };
								my $err = $@;
								if ($err) {
								  err_dialog(N("Error"), N("Failed to Modify NFS share.") . "\n\n" . $err);
								}
							      }),
					 0, gtksignal_connect(Gtk2::Button->new(N("Remove")), clicked => sub {
								eval { remove_entry($model, $treeview) };
								my $err = $@;
								if ($err) {
								  err_dialog(N("Error"), N("Failed to remove an NFS share.") . "\n\n" . $err);
								}
							      }),
					),
			    ),
		 0, $okcancel,
		 ),
	);

$W->show_all;
Gtk2->main;
ass='del'>-#: diskdrake/interactive.pm:400
+#: diskdrake/interactive.pm:403
#, c-format
msgid "View"
msgstr ""
-#: diskdrake/interactive.pm:405 diskdrake/interactive.pm:760
+#: diskdrake/interactive.pm:408 diskdrake/interactive.pm:768
#, c-format
msgid "Resize"
msgstr "Canvia la mida"
-#: diskdrake/interactive.pm:406
+#: diskdrake/interactive.pm:409
#, c-format
msgid "Format"
msgstr "Formata"
-#: diskdrake/interactive.pm:408 diskdrake/interactive.pm:870
+#: diskdrake/interactive.pm:411 diskdrake/interactive.pm:878
#, c-format
msgid "Add to RAID"
msgstr "Afegeix al RAID"
-#: diskdrake/interactive.pm:409 diskdrake/interactive.pm:891
+#: diskdrake/interactive.pm:412 diskdrake/interactive.pm:899
#, c-format
msgid "Add to LVM"
msgstr "Afegeix a l'LVM"
-#: diskdrake/interactive.pm:410
+#: diskdrake/interactive.pm:413
#, fuzzy, c-format
msgid "Use"
msgstr "ID d'usuari"
-#: diskdrake/interactive.pm:412
+#: diskdrake/interactive.pm:415
#, c-format
msgid "Delete"
msgstr "Suprimeix"
-#: diskdrake/interactive.pm:413
+#: diskdrake/interactive.pm:416
#, c-format
msgid "Remove from RAID"
msgstr "Elimina del RAID"
-#: diskdrake/interactive.pm:414
+#: diskdrake/interactive.pm:417
#, c-format
msgid "Remove from LVM"
msgstr "Elimina de l'LVM"
-#: diskdrake/interactive.pm:415
+#: diskdrake/interactive.pm:418
#, fuzzy, c-format
msgid "Remove from dm"
msgstr "Elimina de l'LVM"
-#: diskdrake/interactive.pm:416
+#: diskdrake/interactive.pm:419
#, c-format
msgid "Modify RAID"
msgstr "Modifica el RAID"
-#: diskdrake/interactive.pm:417
+#: diskdrake/interactive.pm:420
#, c-format
msgid "Use for loopback"
msgstr "Utilitza per a loopback"
-#: diskdrake/interactive.pm:428
+#: diskdrake/interactive.pm:431
#, c-format
msgid "Create"
msgstr "Crea"
-#: diskdrake/interactive.pm:450
+#: diskdrake/interactive.pm:453
#, fuzzy, c-format
msgid "Failed to mount partition"
msgstr "Mou els fitxers a la nova partició"
-#: diskdrake/interactive.pm:482 diskdrake/interactive.pm:484
+#: diskdrake/interactive.pm:485 diskdrake/interactive.pm:487
#, c-format
msgid "Create a new partition"
msgstr "Crea una nova partició"
-#: diskdrake/interactive.pm:486
+#: diskdrake/interactive.pm:489
#, c-format
msgid "Start sector: "
msgstr "Sector d'inici: "
-#: diskdrake/interactive.pm:489 diskdrake/interactive.pm:975
+#: diskdrake/interactive.pm:492 diskdrake/interactive.pm:983
#, c-format
msgid "Size in MB: "
msgstr "Mida en MB: "
-#: diskdrake/interactive.pm:491 diskdrake/interactive.pm:976
+#: diskdrake/interactive.pm:494 diskdrake/interactive.pm:984
#, c-format
msgid "Filesystem type: "
msgstr "Tipus de sistema de fitxers: "
-#: diskdrake/interactive.pm:497
+#: diskdrake/interactive.pm:500
#, c-format
msgid "Preference: "
msgstr "Preferència: "
-#: diskdrake/interactive.pm:500
+#: diskdrake/interactive.pm:503
#, c-format
msgid "Logical volume name "
msgstr "Nom del volum lògic"
-#: diskdrake/interactive.pm:520
+#: diskdrake/interactive.pm:523
#, c-format
msgid ""
"You can not create a new partition\n"
@@ -1662,69 +1668,69 @@ msgstr ""
"(perquè heu arribat al màxim nombre de particions primàries).\n"
"Esborreu primer una partició primària i creeu una partició ampliada."
-#: diskdrake/interactive.pm:550
+#: diskdrake/interactive.pm:553
#, c-format
msgid "Remove the loopback file?"
msgstr "Voleu suprimir el fitxer de loopback?"
-#: diskdrake/interactive.pm:572
+#: diskdrake/interactive.pm:575
#, c-format
msgid ""
"After changing type of partition %s, all data on this partition will be lost"
msgstr ""
"Després de canviar el tipus de la partició %s, se'n perdran totes les dades"
-#: diskdrake/interactive.pm:585
+#: diskdrake/interactive.pm:588
#, c-format
msgid "Change partition type"
msgstr "Canvia el tipus de partició"
-#: diskdrake/interactive.pm:587 diskdrake/removable.pm:47
+#: diskdrake/interactive.pm:590 diskdrake/removable.pm:47
#, c-format
msgid "Which filesystem do you want?"
msgstr "Quin sistema de fitxers voleu?"
-#: diskdrake/interactive.pm:594
+#: diskdrake/interactive.pm:597
#, fuzzy, c-format
msgid "Switching from %s to %s"
msgstr "S'està canviant de ext2 a ext3"
-#: diskdrake/interactive.pm:624
+#: diskdrake/interactive.pm:632
#, fuzzy, c-format
msgid "Set volume label"
msgstr "Etiqueta del volum: "
-#: diskdrake/interactive.pm:626
+#: diskdrake/interactive.pm:634
#, c-format
msgid "Beware, this will be written to disk as soon as you validate!"
msgstr ""
-#: diskdrake/interactive.pm:627
+#: diskdrake/interactive.pm:635
#, c-format
msgid "Beware, this will be written to disk only after formatting!"
msgstr ""
-#: diskdrake/interactive.pm:629
+#: diskdrake/interactive.pm:637
#, c-format
msgid "Which volume label?"
msgstr ""
-#: diskdrake/interactive.pm:630
+#: diskdrake/interactive.pm:638
#, fuzzy, c-format
msgid "Label:"
msgstr "Etiqueta"
-#: diskdrake/interactive.pm:651
+#: diskdrake/interactive.pm:659
#, c-format
msgid "Where do you want to mount the loopback file %s?"
msgstr "On voleu muntar el fitxer de loopback %s?"
-#: diskdrake/interactive.pm:652
+#: diskdrake/interactive.pm:660
#, c-format
msgid "Where do you want to mount device %s?"
msgstr "On voleu muntar el dispositiu %s?"
-#: diskdrake/interactive.pm:657
+#: diskdrake/interactive.pm:665
#, c-format
msgid ""
"Can not unset mount point as this partition is used for loop back.\n"
@@ -1733,59 +1739,59 @@ msgstr ""
"No es pot anul·lar el punt de muntatge, perquè aquesta partició\n"
"s'utilitza per al loopback. Elimineu primer el loopback"
-#: diskdrake/interactive.pm:687
+#: diskdrake/interactive.pm:695
#, c-format
msgid "Where do you want to mount %s?"
msgstr "On voleu muntar %s?"
-#: diskdrake/interactive.pm:711 diskdrake/interactive.pm:794
-#: fs/partitioning_wizard.pm:129 fs/partitioning_wizard.pm:191
+#: diskdrake/interactive.pm:719 diskdrake/interactive.pm:802
+#: fs/partitioning_wizard.pm:128 fs/partitioning_wizard.pm:204
#, c-format
msgid "Resizing"
msgstr "S'està canviant la mida"
-#: diskdrake/interactive.pm:711
+#: diskdrake/interactive.pm:719
#, c-format
msgid "Computing FAT filesystem bounds"
msgstr "S'estan calculant els límits del sistema de fitxers de la FAT"
-#: diskdrake/interactive.pm:747
+#: diskdrake/interactive.pm:755
#, c-format
msgid "This partition is not resizeable"
msgstr "No es pot canviar la mida d'aquesta partició"
-#: diskdrake/interactive.pm:752
+#: diskdrake/interactive.pm:760
#, c-format
msgid "All data on this partition should be backed-up"
msgstr "Cal fer una còpia de seguretat de totes les dades d'aquesta partició"
-#: diskdrake/interactive.pm:754
+#: diskdrake/interactive.pm:762
#, c-format
msgid "After resizing partition %s, all data on this partition will be lost"
msgstr ""
"Després de canviar la mida de la partició %s, se'n perdran totes les dades"
-#: diskdrake/interactive.pm:761
+#: diskdrake/interactive.pm:769
#, c-format
msgid "Choose the new size"
msgstr "Escolliu la nova mida"
-#: diskdrake/interactive.pm:762
+#: diskdrake/interactive.pm:770
#, c-format
msgid "New size in MB: "
msgstr "Nova mida en MB: "
-#: diskdrake/interactive.pm:763
+#: diskdrake/interactive.pm:771
#, c-format
msgid "Minimum size: %s MB"
msgstr ""
-#: diskdrake/interactive.pm:764
+#: diskdrake/interactive.pm:772
#, c-format
msgid "Maximum size: %s MB"
msgstr ""
-#: diskdrake/interactive.pm:805
+#: diskdrake/interactive.pm:813 fs/partitioning_wizard.pm:212
#, fuzzy, c-format
msgid ""
"To ensure data integrity after resizing the partition(s),\n"
@@ -1796,175 +1802,175 @@ msgstr ""
"les comprovacions del sistema de fitxers es realitzaran el proper cop que "
"arrenqueu en Windows(TM)"
-#: diskdrake/interactive.pm:853 diskdrake/interactive.pm:1415
+#: diskdrake/interactive.pm:861 diskdrake/interactive.pm:1423
#, c-format
msgid "Filesystem encryption key"
msgstr "Clau de xifratge del sistema de fitxers: "
-#: diskdrake/interactive.pm:854
+#: diskdrake/interactive.pm:862
#, fuzzy, c-format
msgid "Enter your filesystem encryption key"
msgstr "Escolliu la clau de xifratge del sistema de fitxers"
-#: diskdrake/interactive.pm:855 diskdrake/interactive.pm:1423
+#: diskdrake/interactive.pm:863 diskdrake/interactive.pm:1431
#, c-format
msgid "Encryption key"
msgstr "Clau de xifratge"
-#: diskdrake/interactive.pm:862
+#: diskdrake/interactive.pm:870
#, c-format
msgid "Invalid key"
msgstr ""
-#: diskdrake/interactive.pm:870
+#: diskdrake/interactive.pm:878
#, c-format
msgid "Choose an existing RAID to add to"
msgstr "Escolliu un RAID existent al qual afegir-ho"
-#: diskdrake/interactive.pm:872 diskdrake/interactive.pm:893
+#: diskdrake/interactive.pm:880 diskdrake/interactive.pm:901
#, c-format
msgid "new"
msgstr "nou"
-#: diskdrake/interactive.pm:891
+#: diskdrake/interactive.pm:899
#, c-format
msgid "Choose an existing LVM to add to"
msgstr "Escolliu un LVM existent al qual afegir-ho"
-#: diskdrake/interactive.pm:903 diskdrake/interactive.pm:912
+#: diskdrake/interactive.pm:911 diskdrake/interactive.pm:920
#, fuzzy, c-format
msgid "LVM name"
msgstr "Nom LVM?"
-#: diskdrake/interactive.pm:904
+#: diskdrake/interactive.pm:912
#, c-format
msgid "Enter a name for the new LVM volume group"
msgstr ""
-#: diskdrake/interactive.pm:909
+#: diskdrake/interactive.pm:917
#, fuzzy, c-format
msgid "\"%s\" already exists"
msgstr "El fitxer ja existeix. El voleu utilitzar?"
-#: diskdrake/interactive.pm:940
+#: diskdrake/interactive.pm:948
#, c-format
msgid ""
"Physical volume %s is still in use.\n"
"Do you want to move used physical extents on this volume to other volumes?"
msgstr ""
-#: diskdrake/interactive.pm:942
+#: diskdrake/interactive.pm:950
#, c-format
msgid "Moving physical extents"
msgstr ""
-#: diskdrake/interactive.pm:960
+#: diskdrake/interactive.pm:968
#, c-format
msgid "This partition can not be used for loopback"
msgstr "Aquesta partició no es pot utilitzar per al loopback"
-#: diskdrake/interactive.pm:973
+#: diskdrake/interactive.pm:981
#, c-format
msgid "Loopback"
msgstr "Loopback"
-#: diskdrake/interactive.pm:974
+#: diskdrake/interactive.pm:982
#, c-format
msgid "Loopback file name: "
msgstr "Nom del fitxer de loopback: "
-#: diskdrake/interactive.pm:979
+#: diskdrake/interactive.pm:987
#, c-format
msgid "Give a file name"
msgstr "Proporcioneu un nom de fitxer"
-#: diskdrake/interactive.pm:982
+#: diskdrake/interactive.pm:990
#, c-format
msgid "File is already used by another loopback, choose another one"
msgstr "Un altre loopback ja està utilitzant el fitxer, escolliu-ne un altre"
-#: diskdrake/interactive.pm:983
+#: diskdrake/interactive.pm:991
#, c-format
msgid "File already exists. Use it?"
msgstr "El fitxer ja existeix. El voleu utilitzar?"
-#: diskdrake/interactive.pm:1015 diskdrake/interactive.pm:1018
+#: diskdrake/interactive.pm:1023 diskdrake/interactive.pm:1026
#, c-format
msgid "Mount options"
msgstr "Opcions de muntatge"
-#: diskdrake/interactive.pm:1025
+#: diskdrake/interactive.pm:1033
#, c-format
msgid "Various"
msgstr "Diversos"
-#: diskdrake/interactive.pm:1092
+#: diskdrake/interactive.pm:1100
#, c-format
msgid "device"
msgstr "dispositiu"
-#: diskdrake/interactive.pm:1093
+#: diskdrake/interactive.pm:1101
#, c-format
msgid "level"
msgstr "nivell"
-#: diskdrake/interactive.pm:1094
+#: diskdrake/interactive.pm:1102
#, c-format
msgid "chunk size in KiB"
msgstr "mida del fragment en KB"
-#: diskdrake/interactive.pm:1112
+#: diskdrake/interactive.pm:1120
#, c-format
msgid "Be careful: this operation is dangerous."
msgstr "Aneu amb compte: aquesta operació és perillosa."
-#: diskdrake/interactive.pm:1127
+#: diskdrake/interactive.pm:1135
#, fuzzy, c-format
msgid "Partitioning Type"
msgstr "Particionament"
-#: diskdrake/interactive.pm:1127
+#: diskdrake/interactive.pm:1135
#, c-format
msgid "What type of partitioning?"
msgstr "Quin tipus de particionament voleu?"
-#: diskdrake/interactive.pm:1165
+#: diskdrake/interactive.pm:1173
#, c-format
msgid "You'll need to reboot before the modification can take place"
msgstr ""
"Us caldrà tornar a arrencar per tal que les modificacions tinguin efecte"
-#: diskdrake/interactive.pm:1174
+#: diskdrake/interactive.pm:1182
#, c-format
msgid "Partition table of drive %s is going to be written to disk"
msgstr "La taula de particions de la unitat %s s'escriurà al disc"
-#: diskdrake/interactive.pm:1196 fs/format.pm:96 fs/format.pm:103
+#: diskdrake/interactive.pm:1204 fs/format.pm:99 fs/format.pm:106
#, c-format
msgid "Formatting partition %s"
msgstr "S'està formatant la partició %s"
-#: diskdrake/interactive.pm:1209
+#: diskdrake/interactive.pm:1217
#, c-format
msgid "After formatting partition %s, all data on this partition will be lost"
msgstr "Després de formatar la partició %s, se'n perdran totes les dades"
-#: diskdrake/interactive.pm:1218 fs/partitioning.pm:48
+#: diskdrake/interactive.pm:1226 fs/partitioning.pm:48
#, c-format
msgid "Check bad blocks?"
msgstr "Voleu comprovar els blocs incorrectes?"
-#: diskdrake/interactive.pm:1232
+#: diskdrake/interactive.pm:1240
#, c-format
msgid "Move files to the new partition"
msgstr "Mou els fitxers a la nova partició"
-#: diskdrake/interactive.pm:1232
+#: diskdrake/interactive.pm:1240
#, c-format
msgid "Hide files"
msgstr "Fitxers ocults"
-#: diskdrake/interactive.pm:1233
+#: diskdrake/interactive.pm:1241
#, c-format
msgid ""
"Directory %s already contains data\n"
@@ -1975,128 +1981,128 @@ msgid ""
"the contents of the mounted partition)"
msgstr ""
-#: diskdrake/interactive.pm:1248
+#: diskdrake/interactive.pm:1256
#, c-format
msgid "Moving files to the new partition"
msgstr "S'estan movent els fitxers a la nova partició"
-#: diskdrake/interactive.pm:1252
+#: diskdrake/interactive.pm:1260
#, c-format
msgid "Copying %s"
msgstr "S'està copiant %s"
-#: diskdrake/interactive.pm:1256
+#: diskdrake/interactive.pm:1264
#, c-format
msgid "Removing %s"
msgstr "S'està esborrant %s"
-#: diskdrake/interactive.pm:1270
+#: diskdrake/interactive.pm:1278
#, c-format
msgid "partition %s is now known as %s"
msgstr "la partició %s ara és %s"
-#: diskdrake/interactive.pm:1271
+#: diskdrake/interactive.pm:1279
#, c-format
msgid "Partitions have been renumbered: "
msgstr ""
-#: diskdrake/interactive.pm:1296 diskdrake/interactive.pm:1364
+#: diskdrake/interactive.pm:1304 diskdrake/interactive.pm:1372
#, c-format
msgid "Device: "
msgstr "Dispositiu: "
-#: diskdrake/interactive.pm:1297
+#: diskdrake/interactive.pm:1305
#, c-format
msgid "Volume label: "
msgstr "Etiqueta del volum: "
-#: diskdrake/interactive.pm:1298
+#: diskdrake/interactive.pm:1306
#, c-format
msgid "UUID: "
msgstr ""
-#: diskdrake/interactive.pm:1299
+#: diskdrake/interactive.pm:1307
#, c-format
msgid "DOS drive letter: %s (just a guess)\n"
msgstr "Lletra d'unitat de DOS: %s (només és una suposició)\n"
-#: diskdrake/interactive.pm:1303 diskdrake/interactive.pm:1312
-#: diskdrake/interactive.pm:1383
+#: diskdrake/interactive.pm:1311 diskdrake/interactive.pm:1320
+#: diskdrake/interactive.pm:1391
#, c-format
msgid "Type: "
msgstr "Tipus: "
-#: diskdrake/interactive.pm:1307 diskdrake/interactive.pm:1368
+#: diskdrake/interactive.pm:1315 diskdrake/interactive.pm:1376
#, c-format
msgid "Name: "
msgstr "Nom: "
-#: diskdrake/interactive.pm:1314
+#: diskdrake/interactive.pm:1322
#, c-format
msgid "Start: sector %s\n"
msgstr "Inici: sector %s\n"
-#: diskdrake/interactive.pm:1315
+#: diskdrake/interactive.pm:1323
#, c-format
msgid "Size: %s"
msgstr "Mida: %s"
-#: diskdrake/interactive.pm:1317
+#: diskdrake/interactive.pm:1325
#, c-format
msgid ", %s sectors"
msgstr ", %s sectors"
-#: diskdrake/interactive.pm:1319
+#: diskdrake/interactive.pm:1327
#, c-format
msgid "Cylinder %d to %d\n"
msgstr "Cilindre %d a %d\n"
-#: diskdrake/interactive.pm:1320
+#: diskdrake/interactive.pm:1328
#, c-format
msgid "Number of logical extents: %d\n"
msgstr ""
-#: diskdrake/interactive.pm:1321
+#: diskdrake/interactive.pm:1329
#, c-format
msgid "Formatted\n"
msgstr "Formatat\n"
-#: diskdrake/interactive.pm:1322
+#: diskdrake/interactive.pm:1330
#, c-format
msgid "Not formatted\n"
msgstr "Sense formatar\n"
-#: diskdrake/interactive.pm:1323
+#: diskdrake/interactive.pm:1331
#, c-format
msgid "Mounted\n"
msgstr "Muntat\n"
-#: diskdrake/interactive.pm:1324
+#: diskdrake/interactive.pm:1332
#, c-format
msgid "RAID %s\n"
msgstr "RAID %s\n"
-#: diskdrake/interactive.pm:1326
+#: diskdrake/interactive.pm:1334
#, fuzzy, c-format
msgid "Encrypted"
msgstr "Clau de xifratge"
-#: diskdrake/interactive.pm:1326
+#: diskdrake/interactive.pm:1334
#, c-format
msgid " (mapped on %s)"
msgstr ""
-#: diskdrake/interactive.pm:1327
+#: diskdrake/interactive.pm:1335
#, c-format
msgid " (to map on %s)"
msgstr ""
-#: diskdrake/interactive.pm:1328
+#: diskdrake/interactive.pm:1336
#, c-format
msgid " (inactive)"
msgstr ""
-#: diskdrake/interactive.pm:1334
+#: diskdrake/interactive.pm:1342
#, c-format
msgid ""
"Loopback file(s):\n"
@@ -2105,7 +2111,7 @@ msgstr ""
"Fitxer(s) de loopback:\n"
" %s\n"
-#: diskdrake/interactive.pm:1335
+#: diskdrake/interactive.pm:1343
#, c-format
msgid ""
"Partition booted by default\n"
@@ -2114,27 +2120,27 @@ msgstr ""
"Partició arrencada per defecte\n"
" (per a l'arrencada de l'MS-DOS, no per a LILO)\n"
-#: diskdrake/interactive.pm:1337
+#: diskdrake/interactive.pm:1345
#, c-format
msgid "Level %s\n"
msgstr "Nivell %s\n"
-#: diskdrake/interactive.pm:1338
+#: diskdrake/interactive.pm:1346
#, c-format
msgid "Chunk size %d KiB\n"
msgstr "Mida del fragment %d KB\n"
-#: diskdrake/interactive.pm:1339
+#: diskdrake/interactive.pm:1347
#, c-format
msgid "RAID-disks %s\n"
msgstr "Discs RAID %s\n"
-#: diskdrake/interactive.pm:1341
+#: diskdrake/interactive.pm:1349
#, c-format
msgid "Loopback file name: %s"
msgstr "Nom del fitxer de loopback: %s"
-#: diskdrake/interactive.pm:1344
+#: diskdrake/interactive.pm:1352
#, c-format
msgid ""
"\n"
@@ -2147,7 +2153,7 @@ msgstr ""
"una partició de programes de control. Potser\n"
"és millor que no la toqueu.\n"
-#: diskdrake/interactive.pm:1347
+#: diskdrake/interactive.pm:1355
#, c-format
msgid ""
"\n"
@@ -2160,69 +2166,69 @@ msgstr ""
"Bootstrap és per arrencar\n"
"el vostre sistema en dual.\n"
-#: diskdrake/interactive.pm:1356
+#: diskdrake/interactive.pm:1364
#, c-format
msgid "Free space on %s (%s)"
msgstr ""
-#: diskdrake/interactive.pm:1365
+#: diskdrake/interactive.pm:1373
#, c-format
msgid "Read-only"
msgstr "Només lectura"
-#: diskdrake/interactive.pm:1366
+#: diskdrake/interactive.pm:1374
#, c-format
msgid "Size: %s\n"
msgstr "Mida: %s\n"
-#: diskdrake/interactive.pm:1367
+#: diskdrake/interactive.pm:1375
#, c-format
msgid "Geometry: %s cylinders, %s heads, %s sectors\n"
msgstr "Geometria: %s cilindres, %s capçals, %s sectors\n"
-#: diskdrake/interactive.pm:1369
+#: diskdrake/interactive.pm:1377
#, fuzzy, c-format
msgid "Medium type: "
msgstr "Tipus de sistema de fitxers: "
-#: diskdrake/interactive.pm:1370
+#: diskdrake/interactive.pm:1378
#, c-format
msgid "LVM-disks %s\n"
msgstr "Discs LVM %s\n"
-#: diskdrake/interactive.pm:1371
+#: diskdrake/interactive.pm:1379
#, c-format
msgid "Partition table type: %s\n"
msgstr "Tipus de taula de particions: %s\n"
-#: diskdrake/interactive.pm:1372
+#: diskdrake/interactive.pm:1380
#, c-format
msgid "on channel %d id %d\n"
msgstr "al canal %d amb id %d\n"
-#: diskdrake/interactive.pm:1416
+#: diskdrake/interactive.pm:1424
#, c-format
msgid "Choose your filesystem encryption key"
msgstr "Escolliu la clau de xifratge del sistema de fitxers"
-#: diskdrake/interactive.pm:1419
+#: diskdrake/interactive.pm:1427
#, c-format
msgid "This encryption key is too simple (must be at least %d characters long)"
msgstr ""
"Aquesta clau de xifratge és massa senzilla (ha de tenir com a mínim %d "
"caràcters)"
-#: diskdrake/interactive.pm:1420
+#: diskdrake/interactive.pm:1428
#, c-format
msgid "The encryption keys do not match"
msgstr "Les claus de xifratge no coincideixen"
-#: diskdrake/interactive.pm:1424
+#: diskdrake/interactive.pm:1432
#, c-format
msgid "Encryption key (again)"
msgstr "Clau de xifratge (un altre cop)"
-#: diskdrake/interactive.pm:1426
+#: diskdrake/interactive.pm:1434
#, c-format
msgid "Encryption algorithm"
msgstr "Algoritme de xifrat"
@@ -2234,7 +2240,7 @@ msgstr "Canvia el tipus"
#: diskdrake/smbnfs_gtk.pm:81 interactive.pm:129 interactive.pm:550
#: interactive/curses.pm:260 interactive/http.pm:104 interactive/http.pm:160
-#: interactive/stdio.pm:39 interactive/stdio.pm:148 mygtk2.pm:846 ugtk2.pm:415
+#: interactive/stdio.pm:39 interactive/stdio.pm:148 mygtk2.pm:847 ugtk2.pm:415
#: ugtk2.pm:517 ugtk2.pm:526 ugtk2.pm:812
#, c-format
msgid "Cancel"
@@ -2330,32 +2336,32 @@ msgstr ""
"sistemes de fitxers. Si us plau, comproveu el vostre maquinari per trobar el "
"problema"
-#: fs/any.pm:75 fs/partitioning_wizard.pm:60
+#: fs/any.pm:75 fs/partitioning_wizard.pm:61
#, c-format
msgid "You must have a FAT partition mounted in /boot/efi"
msgstr "Heu de tenir una partició FAT muntada en /boot/efi"
-#: fs/format.pm:100
+#: fs/format.pm:103
#, c-format
msgid "Creating and formatting file %s"
msgstr "S'està creant i formatant el fitxer %s"
-#: fs/format.pm:119
+#: fs/format.pm:122
#, fuzzy, c-format
msgid "I do not know how to set label on %s with type %s"
msgstr "No sé com formatar %s amb el tipus %s"
-#: fs/format.pm:126
+#: fs/format.pm:131
#, fuzzy, c-format
msgid "setting label on %s failed, is it formatted?"
msgstr "%s formatació de %s ha fallat"
-#: fs/format.pm:167
+#: fs/format.pm:172
#, c-format
msgid "I do not know how to format %s in type %s"
msgstr "No sé com formatar %s amb el tipus %s"
-#: fs/format.pm:172 fs/format.pm:174
+#: fs/format.pm:177 fs/format.pm:179
#, c-format
msgid "%s formatting of %s failed"
msgstr "%s formatació de %s ha fallat"
@@ -2546,7 +2552,7 @@ msgstr ""
"No hi ha prou espai d'intercanvi per completar la instal·lació; si us plau, "
"afegiu-ne"
-#: fs/partitioning_wizard.pm:52
+#: fs/partitioning_wizard.pm:53
#, c-format
msgid ""
"You must have a root partition.\n"
@@ -2557,7 +2563,7 @@ msgstr ""
"Per fer-ho, creeu una partició (o feu clic a una d'existent).\n"
"Després, trieu l'acció \"Punt de muntatge\" i doneu-li el valor '/'"
-#: fs/partitioning_wizard.pm:57
+#: fs/partitioning_wizard.pm:58
#, c-format
msgid ""
"You do not have a swap partition.\n"
@@ -2568,42 +2574,42 @@ msgstr ""
"\n"
"Voleu continuar igualment?"
-#: fs/partitioning_wizard.pm:93
+#: fs/partitioning_wizard.pm:92
#, c-format
msgid "Use free space"
msgstr "Utilitza l'espai lliure"
-#: fs/partitioning_wizard.pm:95
+#: fs/partitioning_wizard.pm:94
#, c-format
msgid "Not enough free space to allocate new partitions"
msgstr "No hi ha prou espai lliure per assignar noves particions"
-#: fs/partitioning_wizard.pm:103
+#: fs/partitioning_wizard.pm:102
#, c-format
msgid "Use existing partitions"
msgstr "Utilitza les particions existents"
-#: fs/partitioning_wizard.pm:105
+#: fs/partitioning_wizard.pm:104
#, c-format
msgid "There is no existing partition to use"
msgstr "No hi ha cap partició que es pugui utilitzar"
-#: fs/partitioning_wizard.pm:129
+#: fs/partitioning_wizard.pm:128
#, c-format
msgid "Computing the size of the Microsoft Windows® partition"
msgstr "S'està calculant la mida de la partició de Microsoft Windows®"
-#: fs/partitioning_wizard.pm:148
+#: fs/partitioning_wizard.pm:164
#, fuzzy, c-format
msgid "Use the free space on a Microsoft Windows® partition"
msgstr "Utilitza l'espai lliure de la partició de Windows"
-#: fs/partitioning_wizard.pm:152
+#: fs/partitioning_wizard.pm:168
#, c-format
msgid "Which partition do you want to resize?"
msgstr "A quina partició voleu canviar-li la mida?"
-#: fs/partitioning_wizard.pm:162
+#: fs/partitioning_wizard.pm:171
#, c-format
msgid ""
"Your Microsoft Windows® partition is too fragmented. Please reboot your "
@@ -2614,7 +2620,7 @@ msgstr ""
"reinicieu l'ordinador sota Microsoft Windows® i executeu l'eina \"defrag\". "
"Llavors, torneu a començar la instal·lació del Mandriva Linux."
-#: fs/partitioning_wizard.pm:166
+#: fs/partitioning_wizard.pm:179
#, c-format
msgid ""
"WARNING!\n"
@@ -2650,87 +2656,76 @@ msgstr ""
"Quan estigueu segur, premeu %s."
#. -PO: keep the double empty lines between sections, this is formatted a la LaTeX
-#: fs/partitioning_wizard.pm:175 fs/partitioning_wizard.pm:498
+#: fs/partitioning_wizard.pm:188 fs/partitioning_wizard.pm:548
#: interactive.pm:549 interactive/curses.pm:263 ugtk2.pm:519
#, c-format
msgid "Next"
msgstr "Següent"
-#: fs/partitioning_wizard.pm:180
+#: fs/partitioning_wizard.pm:194
#, fuzzy, c-format
msgid "Partitionning"
msgstr "Particionament"
-#: fs/partitioning_wizard.pm:180
+#: fs/partitioning_wizard.pm:194
#, c-format
msgid "Which size do you want to keep for Microsoft Windows® on partition %s?"
msgstr ""
"Quina mida voleu deixar per a la partició de Microsoft Windows® partició %s?"
-#: fs/partitioning_wizard.pm:181
+#: fs/partitioning_wizard.pm:195
#, c-format
msgid "Size"
msgstr "Mida"
-#: fs/partitioning_wizard.pm:191
+#: fs/partitioning_wizard.pm:204
#, c-format
msgid "Resizing Microsoft Windows® partition"
msgstr "S'està redimensionant la partició de Microsoft Windows®"
-#: fs/partitioning_wizard.pm:196
+#: fs/partitioning_wizard.pm:209
#, c-format
msgid "FAT resizing failed: %s"
msgstr "Ha fallat el redimensionament de la FAT: %s"
-#: fs/partitioning_wizard.pm:199
-#, c-format
-msgid ""
-"To ensure data integrity after resizing the partition(s), \n"
-"filesystem checks will be run on your next boot into Microsoft Windows®"
-msgstr ""
-"Per assegurar la integritat de les dades després de canviar la mida de la o "
-"les particions,\n"
-"les comprovacions del sistema de fitxers es realitzaran el proper cop que "
-"arrenqueu en Windows(TM)"
-
-#: fs/partitioning_wizard.pm:212
+#: fs/partitioning_wizard.pm:225
#, c-format
msgid "There is no FAT partition to resize (or not enough space left)"
msgstr ""
"No hi ha cap partició FAT a la qual canviar la mida (o no queda prou espai)"
-#: fs/partitioning_wizard.pm:217
+#: fs/partitioning_wizard.pm:230
#, c-format
msgid "Remove Microsoft Windows®"
msgstr "Elimina el Microsoft Windows®"
-#: fs/partitioning_wizard.pm:217
+#: fs/partitioning_wizard.pm:230
#, fuzzy, c-format
msgid "Erase and use entire disk"
msgstr "Esborra tot el disc"
-#: fs/partitioning_wizard.pm:221
+#: fs/partitioning_wizard.pm:234
#, c-format
msgid "You have more than one hard drive, which one do you install linux on?"
msgstr "Teniu més d'un disc dur; en quin voleu instal·lar el Linux?"
-#: fs/partitioning_wizard.pm:229 fsedit.pm:600
+#: fs/partitioning_wizard.pm:242 fsedit.pm:600
#, c-format
msgid "ALL existing partitions and their data will be lost on drive %s"
msgstr ""
"Es perdran TOTES les particions, i les dades que contenen, de la unitat %s"
-#: fs/partitioning_wizard.pm:239
+#: fs/partitioning_wizard.pm:252
#, c-format
msgid "Custom disk partitioning"
msgstr "Particionament personalitzat de disc"
-#: fs/partitioning_wizard.pm:245
+#: fs/partitioning_wizard.pm:258
#, c-format
msgid "Use fdisk"
msgstr "Utilitza l'fdisk"
-#: fs/partitioning_wizard.pm:248
+#: fs/partitioning_wizard.pm:261
#, c-format
msgid ""
"You can now partition %s.\n"
@@ -2739,23 +2734,28 @@ msgstr ""
"Ara podeu fer les particions a %s.\n"
"Quan acabeu, no oblideu desar-les utilitzant 'w'"
-#: fs/partitioning_wizard.pm:388 fs/partitioning_wizard.pm:518
+#: fs/partitioning_wizard.pm:401
+#, fuzzy, c-format
+msgid "Ext2/3/4"
+msgstr "Surt"
+
+#: fs/partitioning_wizard.pm:431 fs/partitioning_wizard.pm:568
#, c-format
msgid "I can not find any room for installing"
msgstr "No es pot trobar espai per a la instal·lació"
-#: fs/partitioning_wizard.pm:397 fs/partitioning_wizard.pm:525
+#: fs/partitioning_wizard.pm:440 fs/partitioning_wizard.pm:575
#, c-format
msgid "The DrakX Partitioning wizard found the following solutions:"
msgstr ""
"L'auxiliar de particionament del DrakX ha trobat les solucions següents:"
-#: fs/partitioning_wizard.pm:459
+#: fs/partitioning_wizard.pm:509
#, c-format
msgid "Here is the content of your disk drive "
msgstr ""
-#: fs/partitioning_wizard.pm:535
+#: fs/partitioning_wizard.pm:585
#, c-format
msgid "Partitioning failed: %s"
msgstr "Ha fallat el particionament: %s"
@@ -3407,7 +3407,7 @@ msgstr "Tipus de sintonitzador:"
#: interactive.pm:128 interactive.pm:549 interactive/curses.pm:263
#: interactive/http.pm:103 interactive/http.pm:156 interactive/stdio.pm:39
-#: interactive/stdio.pm:148 interactive/stdio.pm:149 mygtk2.pm:846
+#: interactive/stdio.pm:148 interactive/stdio.pm:149 mygtk2.pm:847
#: ugtk2.pm:421 ugtk2.pm:519 ugtk2.pm:812 ugtk2.pm:835
#, c-format
msgid "Ok"
@@ -4745,27 +4745,27 @@ msgstr "Zàmbia"
msgid "Zimbabwe"
msgstr "Zimbabwe"
-#: lang.pm:1223
+#: lang.pm:1206
#, c-format
msgid "Welcome to %s"
msgstr "Benvingut a %s"
-#: lvm.pm:84
+#: lvm.pm:86
#, c-format
msgid "Moving used physical extents to other physical volumes failed"
msgstr ""
-#: lvm.pm:141
+#: lvm.pm:143
#, c-format
msgid "Physical volume %s is still in use"
msgstr "El volum físic %s encara està en ús"
-#: lvm.pm:151
+#: lvm.pm:153
#, c-format
msgid "Remove the logical volumes first\n"
msgstr "Elimineu primer els volums lògics\n"
-#: lvm.pm:184
+#: lvm.pm:186
#, fuzzy, c-format
msgid "The bootloader can't handle /boot on multiple physical volumes"
msgstr ""
@@ -5289,17 +5289,17 @@ msgstr ""
"Ha fallat la càrrega del mòdul %s.\n"
"Voleu tornar-ho a intentar amb altres paràmetres?"
-#: mygtk2.pm:1540 mygtk2.pm:1541
+#: mygtk2.pm:1541 mygtk2.pm:1542
#, c-format
msgid "Password is trivial to guess"
msgstr ""
-#: mygtk2.pm:1542
+#: mygtk2.pm:1543
#, c-format
msgid "Password should resist to basic attacks"
msgstr ""
-#: mygtk2.pm:1543 mygtk2.pm:1544
+#: mygtk2.pm:1544 mygtk2.pm:1545
#, fuzzy, c-format
msgid "Password seems secure"
msgstr "Contrasenya"
@@ -6728,7 +6728,7 @@ msgstr ""
" --boot - habilita la configuració del carregador d'arrencada\n"
"mode per defecte: ofereix la configuració de l'entrada automàtica"
-#: standalone.pm:61
+#: standalone.pm:60
#, c-format
msgid ""
"[OPTIONS] [PROGRAM_NAME]\n"
@@ -6747,7 +6747,7 @@ msgstr ""
" --incident - el programa ha de ser una de les eines de Mandriva "
"Linux"
-#: standalone.pm:67
+#: standalone.pm:66
#, c-format
msgid ""
"[--add]\n"
@@ -6758,7 +6758,7 @@ msgid ""
" --wizard - like --add"
msgstr ""
-#: standalone.pm:73
+#: standalone.pm:72
#, c-format
msgid ""
"\n"
@@ -6792,7 +6792,7 @@ msgstr ""
" : nom_de_l'aplicació, com ara so per a l'StarOffice \n"
" : i gs per al ghostscript per utilitzar només aquesta."
-#: standalone.pm:88
+#: standalone.pm:87
#, fuzzy, c-format
msgid ""
"[OPTIONS]...\n"
@@ -6824,17 +6824,17 @@ msgstr ""
"--delclient : suprimeix de l'MTS una màquina client (cal una adreça "
"MAC, IP, nom d'imatge nbi)"
-#: standalone.pm:100
+#: standalone.pm:99
#, c-format
msgid "[keyboard]"
msgstr "[teclat]"
-#: standalone.pm:101
+#: standalone.pm:100
#, c-format
msgid "[--file=myfile] [--word=myword] [--explain=regexp] [--alert]"
msgstr "[--file=myfile] [--word=myword] [--explain=regexp] [--alert]"
-#: standalone.pm:102
+#: standalone.pm:101
#, c-format
msgid ""
"[OPTIONS]\n"
@@ -6857,7 +6857,7 @@ msgstr ""
"--status : torna 1 si està connectat, 0 si no, i després surt.\n"
"--quiet : no siguis interactiu. Per utilitzar amb (dis)connect."
-#: standalone.pm:112
+#: standalone.pm:111
#, c-format
msgid ""
"[OPTION]...\n"
@@ -6877,7 +6877,7 @@ msgstr ""
" --merge-all-rpmnew proposa fusionar tots els fitxers .rpmnew/.rpmsave "
"trobats"
-#: standalone.pm:117
+#: standalone.pm:116
#, c-format
msgid ""
"[--manual] [--device=dev] [--update-sane=sane_source_dir] [--update-"
@@ -6886,7 +6886,7 @@ msgstr ""
"[--manual] [--device=dev] [--update-sane=sane_source_dir] [--update-"
"usbtable] [--dynamic=dev]"
-#: standalone.pm:118
+#: standalone.pm:117
#, c-format
msgid ""
" [everything]\n"
@@ -6897,7 +6897,7 @@ msgstr ""
" XFdrake [--noauto] monitor\n"
" XFdrake resolució"
-#: standalone.pm:154
+#: standalone.pm:153
#, c-format
msgid ""
"\n"
@@ -6987,6 +6987,15 @@ msgstr ""
msgid "Installation failed"
msgstr "La instal·lació ha fallat"
+#~ msgid ""
+#~ "To ensure data integrity after resizing the partition(s), \n"
+#~ "filesystem checks will be run on your next boot into Microsoft Windows®"
+#~ msgstr ""
+#~ "Per assegurar la integritat de les dades després de canviar la mida de la "
+#~ "o les particions,\n"
+#~ "les comprovacions del sistema de fitxers es realitzaran el proper cop que "
+#~ "arrenqueu en Windows(TM)"
+
#~ msgid "Use the Microsoft Windows® partition for loopback"
#~ msgstr "Utilitza la partició Microsoft Windows® per al loopback"