From 895e5bbbd1395f444d30b38e9e73ed2580341085 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 16 Dec 2014 21:43:57 -0800 Subject: [PATCH 01/21] Don't fail just because some system actions can't be looked up https://sourceforge.net/p/webadmin/bugs/4522/ --- init/init-lib.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init/init-lib.pl b/init/init-lib.pl index 3c1caf54e..247fb7775 100755 --- a/init/init-lib.pl +++ b/init/init-lib.pl @@ -1959,6 +1959,7 @@ closedir(UNITS); # Dump state of all of them, 100 at a time my %info; +my $ecount = 0; while(@units) { my @args; while(@args < 100 && @units) { @@ -1978,9 +1979,10 @@ while(@units) { $info{$curr}->{$n} = $v; } } - if ($? && keys(%info) < 2) { - &error("Failed to read systemd units : $out"); - } + $ecount++ if ($?); + } +if ($ecount && keys(%info) < 2) { + &error("Failed to read systemd units : $out"); } # Extract info we want From 0b35796814a6c60a6ee878d50a18490e54d98973 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 17 Dec 2014 10:42:34 -0800 Subject: [PATCH 02/21] Respect commented out squid cache dir https://sourceforge.net/p/webadmin/bugs/4523/ --- squid/index.cgi | 2 +- squid/init_cache.cgi | 11 ++++++++++- squid/squid-lib.pl | 12 +++++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/squid/index.cgi b/squid/index.cgi index 40d234468..ad9e92138 100755 --- a/squid/index.cgi +++ b/squid/index.cgi @@ -64,7 +64,7 @@ else { # Check for the cache directory my $conf = &get_config(); my @caches; -if (!&check_cache($conf, \@caches)) { +if (!&check_cache($conf, \@caches, 1)) { &ui_print_header(undef, $text{'index_header'}, "", undef, 1, 1); print "
\n"; if (@caches > 1) { diff --git a/squid/init_cache.cgi b/squid/init_cache.cgi index b67afcc52..7802de7c9 100755 --- a/squid/init_cache.cgi +++ b/squid/init_cache.cgi @@ -10,9 +10,10 @@ $access{'rebuild'} || &error($text{'icache_ecannot'}); &ReadParse(); &error_setup($text{'icache_ftic'}); -# set user to run squid as.. &lock_file($config{'squid_conf'}); my $conf = &get_config(); + +# Set user to run squid as.. if (!$in{'nouser'}) { $in{'user'} || &error($text{'icache_ymcautrsa'}); my @uinfo = getpwnam($in{'user'}); @@ -33,6 +34,14 @@ if (!$in{'nouser'}) { } &flush_file_lines(); } + +# If cache_dir is set but disabled, enable it +my @cachestruct = &find_config("cache_dir", $conf, 2); +if (@cachestruct) { + &save_directive($conf, "cache_dir", \@cachestruct); + &flush_file_lines(); + } + &unlock_file($config{'squid_conf'}); # Stop squid (if running) diff --git a/squid/squid-lib.pl b/squid/squid-lib.pl index 1d701ac3f..e000e3066 100755 --- a/squid/squid-lib.pl +++ b/squid/squid-lib.pl @@ -513,14 +513,20 @@ $rv->{'args'} = [ @v[$i .. $#v] ]; return $rv; } -# check_cache(&config, &caches) +# check_cache(&config, &caches, [include-disabled]) # Returns 1 if the cache directory looks OK, 0 if not. Also fills in the # caches list sub check_cache { -my ($conf, $cachesrv) = @_; +my ($conf, $cachesrv, $distoo) = @_; my (@cachestruct, @caches, $coss); -if (@cachestruct = &find_config("cache_dir", $conf)) { +my @cachestruct = &find_config("cache_dir", $conf); +my $disabled = 0; +if ($distoo && !@cachestruct) { + @cachestruct = &find_config("cache_dir", $conf, 1); + $disabled = 1 if (@cachestruct); + } +if (@cachestruct) { if ($squid_version >= 2.3) { @caches = map { $_->{'values'}->[1] } @cachestruct; } From 5eb98219200e6e5271fe07b0895731170cefced1 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 17 Dec 2014 14:08:56 -0800 Subject: [PATCH 03/21] Extend API for right frame --- web-lib-funcs.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 2004743c8..c75ffd8d8 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -10108,7 +10108,9 @@ to display. Each is a hash ref with the following keys : =item id - A unique ID for the object =item type - Can be "html" for an arbitrary block of HTML, "table" for a table - of information, "usage" for a table of usage of some resource. + of information, "usage" for a table of usage of some resource, + "redirect" for a request to redirect the whole page to another URL, + or "warning" for a warning dialog. =item desc - The title for this section of info @@ -10125,6 +10127,10 @@ to display. Each is a hash ref with the following keys : =item titles - In "usage" mode, an 3-element array ref of titles to show above the usage columns. +=item url - In "redirect" mode, the URL to redirect the system info page to + +=item warning - In "warning" mode, the HTML warning message + For "table" mode, the keys in each hash ref are : =item desc - Label for this item From dc4ea2a94dde4679ba7d573cf10ea3e9deb96ef2 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 17 Dec 2014 14:54:09 -0800 Subject: [PATCH 04/21] Complete support for showing warnings on right frame --- gray-theme/right.cgi | 70 +++++++++++++++++++++++++++++--------------- ui-lib.pl | 2 +- web-lib-funcs.pl | 13 ++++++++ 3 files changed, 60 insertions(+), 25 deletions(-) diff --git a/gray-theme/right.cgi b/gray-theme/right.cgi index fcbe6e36d..30ab3a283 100755 --- a/gray-theme/right.cgi +++ b/gray-theme/right.cgi @@ -10,6 +10,14 @@ our ($current_theme); our %text = &load_language($current_theme); my $bar_width = 300; +# Get system info to show +my @info = &list_combined_system_info(); +my ($redir) = grep { $_->{'type'} eq 'redirect' } @info; +if ($redir) { + &redirect($redir->{'url'}); + return; + } + my $prehead = defined(&WebminCore::theme_prehead) ? &capture_function_output(\&WebminCore::theme_prehead) : ""; &popup_header(undef, $prehead); @@ -20,36 +28,50 @@ if (&get_product_name() eq 'webmin') { print "

\n"; } -# Get system info to show -my @info = &list_combined_system_info(); +# Show notifications first +@info = sort { ($b->{'type'} eq 'warning') <=> ($a->{'type'} eq 'warning') } + @info; foreach my $info (@info) { - print &ui_table_start($info->{'desc'}, "width=600", 2); - if ($info->{'type'} eq 'table') { - # A table of various labels and values - foreach my $t (@{$info->{'table'}}) { - my $chart = ""; - if ($t->{'chart'}) { - my $chart = &make_bar_chart($t->{'chart'}); - $chart = "
".$chart; + if ($info->{'type'} eq 'warning') { + print &ui_alert_box($info->{'warning'}, + $info->{'level'} || 'warn'); + } + else { + print &ui_table_start($info->{'desc'}, "width=600", 2); + if ($info->{'type'} eq 'table') { + # A table of various labels and values + foreach my $t (@{$info->{'table'}}) { + my $chart = ""; + if ($t->{'chart'}) { + my $chart = &make_bar_chart( + $t->{'chart'}); + $chart = "
".$chart; + } + print &ui_table_row($t->{'desc'}, + $t->{'value'}.$chart); } - print &ui_table_row($t->{'desc'}, $t->{'value'}.$chart); } - } - elsif ($info->{'type'} eq 'chart') { - # A table of graphs - my $ctable = &ui_columns_start($info->{'titles'}); - foreach my $t (@{$info->{'chart'}}) { - $ctable .= &ui_columns_row([ - $t->{'desc'}, - &make_bar_chart($t->{'chart'}), - $t->{'value'}, - ]); + elsif ($info->{'type'} eq 'chart') { + # A table of graphs + my $ctable = &ui_columns_start($info->{'titles'}); + foreach my $t (@{$info->{'chart'}}) { + $ctable .= &ui_columns_row([ + $t->{'desc'}, + &make_bar_chart($t->{'chart'}), + $t->{'value'}, + ]); + } + $ctable .= &ui_columns_end(); + print &ui_table_row(undef, $ctable, 2); } - $ctable .= &ui_columns_end(); - print &ui_table_row(undef, $ctable, 2); + elsif ($info->{'type'} eq 'html') { + # A chunk of HTML + print &ui_table_row(undef, $info->{'html'}, 2); + } + print &ui_table_end(); + print "

\n"; } - print &ui_table_end(); } print "

\n"; diff --git a/ui-lib.pl b/ui-lib.pl index e6e354c87..88d222484 100755 --- a/ui-lib.pl +++ b/ui-lib.pl @@ -2386,7 +2386,7 @@ Type of alert: =item info - blue -=item warning - yellow +=item warn - yellow =item danger - red diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index c75ffd8d8..9a5e3e9d8 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -10131,6 +10131,9 @@ to display. Each is a hash ref with the following keys : =item warning - In "warning" mode, the HTML warning message +=item level - In "warning" mode, can be one of "success", "info", "warn" or + "danger" + For "table" mode, the keys in each hash ref are : =item desc - Label for this item @@ -10173,6 +10176,16 @@ foreach my $m (&get_available_module_infos()) { push(@rv, $i); } } +if (&foreign_available("webmin")) { + # Merge in old-style notification API + &foreign_require("webmin"); + foreach my $n (&webmin::get_webmin_notifications()) { + push(@rv, { 'type' => 'warning', + 'level' => 'info', + 'module' => 'webmin', + 'warning' => $n }); + } + } return sort { ($b->{'priority'} || 0) <=> ($a->{'priority'} || 0) } @rv; } From bd1e2ca8289f5caf92f525321c4f0e594a45d37b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 17 Dec 2014 14:54:32 -0800 Subject: [PATCH 05/21] Add param for selecting user to backup as --- postgresql/postgresql-lib.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/postgresql/postgresql-lib.pl b/postgresql/postgresql-lib.pl index f35a620ed..eac45b826 100755 --- a/postgresql/postgresql-lib.pl +++ b/postgresql/postgresql-lib.pl @@ -1121,13 +1121,13 @@ return $config{'host'} eq '' || $config{'host'} eq 'localhost' || &to_ipaddress($config{'host'}) eq &to_ipaddress(&get_system_hostname()); } -# backup_database(database, dest-path, format, [&only-tables]) +# backup_database(database, dest-path, format, [&only-tables], [run-as-user]) # Executes the pg_dump command to backup the specified database to the # given destination path. Returns undef on success, or an error message # on failure. sub backup_database { -local ($db, $path, $format, $tables) = @_; +local ($db, $path, $format, $tables, $user) = @_; local $tablesarg = join(" ", map { " -t ".quotemeta($_) } @$tables); local $cmd = "e_path($config{'dump_cmd'}). (!$postgres_login ? "" : @@ -1137,8 +1137,13 @@ local $cmd = "e_path($config{'dump_cmd'}). $tablesarg. " -F$format -f "."e_path($path)." $db"; if ($postgres_sameunix && defined(getpwnam($postgres_login))) { + # Postgres connections have to be made as the 'postgres' Unix user $cmd = &command_as_user($postgres_login, 0, $cmd); } +elsif ($user) { + # Run as a specific Unix user + $cmd = &command_as_user($user, 0, $cmd); + } $cmd = &command_with_login($cmd); local $out = &backquote_logged("$cmd 2>&1"); if ($? || $out =~ /could not|error|failed/i) { From 28822295d5716463117f98c55de37bc958b10090 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 17 Dec 2014 20:11:37 -0800 Subject: [PATCH 06/21] German translation updates from Raymond Vetter --- firewall/lang/de | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/firewall/lang/de b/firewall/lang/de index 2b7cca01e..f757c8c6b 100644 --- a/firewall/lang/de +++ b/firewall/lang/de @@ -98,6 +98,7 @@ edit_below=Unter edit_chain=Teil der Kette edit_clone=Klone Regel edit_cmt=Regel Kommentar +edit_desc=Die oben ausgewählte Aktion wird nur ausgeführt, wenn alle die unter aufgeführten Bedingungen erfüllt sind. edit_dest=Zieladresse oder Netzwerk edit_dnat=IPs und Ports für DNAT edit_dnatip=IP-Bereich $1 bis $2 @@ -112,6 +113,7 @@ edit_icmptype=ICMP Paket Typ edit_ignore=Ignoriert edit_in=Eingehendes Interface edit_is=Entspricht +edit_limit=Paketflussrate edit_mac=Ethernet Adresse edit_mods=Zusätzliche IPtables Module edit_mtoports=Quellports für masquerading @@ -119,6 +121,9 @@ edit_not=Entspricht nicht edit_oifc=Andere... edit_out=Ausgehendes Interface edit_physdevin=Eingehende physikalische Schnittstelle +edit_physdevisbridged=Paket wird gebridged +edit_physdevisin=Paket eingehend auf Bridge-Schnittstelle +edit_physdevisout=Paket ausgehend auf Bridge-Schnittstelle edit_physdevout=Ausgehendes physikalische Schnittstelle edit_pidowner=Sende Prozess-ID edit_port0=Port(s) @@ -129,6 +134,7 @@ edit_proto=Netzwerkprotokoll edit_rtoports=Zielports für Weiterleitung edit_rwith=Ablehnen mit ICMP-Typ edit_rwithtype=Typ $1 +edit_sidowner=Sende Prozess-Gruppe edit_snat=IPs und Ports für SNAT edit_source=Quelladresse oder Netzwerk edit_sport=Quell TCP oder UDP Port @@ -136,6 +142,7 @@ edit_state=Verbindungsstatus edit_state_established=Bestehende Verbindung edit_state_invalid=Kein Teil einer Verbindung edit_state_new=Neue Verbindung +edit_state_untracked=Nicht getrackt edit_tcpflags=TCP flag gesetzt edit_tcpoption=TCP Option Nummer nicht gesetzt edit_title1=Regel hinzufügen @@ -210,7 +217,7 @@ index_table_mangle=Packet alteration (mangle) index_table_nat=Network address translation (nat) index_title=Linux Firewall index_unapply=Konfiguration zurücksetzen -index_unapply2=Speichere konfiguration +index_unapply2=Speichere Konfiguration index_unapply2desc=Klicke auf diese Schaltfläche, um die Konfiguration oben in die permanente Firewall-Konfigurationsdatei zu speichern. index_unapplydesc=Klicke auf diese Schaltfläche, um die Konfiguration die oben aufgeführt ist, auf die gerade aktive, zurückzusetzen. log_add_group=Cluster-Server von Gruppe $1 hinzugefügt From 6a2127e3f85988236cab5e58d226c0a5e1c23ddb Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 18 Dec 2014 16:48:02 -0800 Subject: [PATCH 07/21] Remove obsolete options --- mysql/edit_cnf.cgi | 3 --- mysql/lang/en | 1 - mysql/save_cnf.cgi | 3 --- 3 files changed, 7 deletions(-) diff --git a/mysql/edit_cnf.cgi b/mysql/edit_cnf.cgi index d20e8951c..515365e59 100755 --- a/mysql/edit_cnf.cgi +++ b/mysql/edit_cnf.cgi @@ -29,9 +29,6 @@ $bind = &find_value("bind-address", $mems); print &ui_table_row($text{'cnf_bind'}, &ui_opt_textbox("bind", $bind, 20, $text{'cnf_all'})); -print &ui_table_row($text{'cnf_skip-locking'}, - &ui_yesno_radio("skip-locking", &find("skip-locking", $mems) ? 1 : 0)); - print &ui_table_row($text{'cnf_big-tables'}, &ui_yesno_radio("big-tables", &find("big-tables", $mems) ? 1 : 0)); diff --git a/mysql/lang/en b/mysql/lang/en index d1f9c45af..7833fb426 100644 --- a/mysql/lang/en +++ b/mysql/lang/en @@ -793,7 +793,6 @@ cnf_socket=MySQL Unix socket cnf_datadir=Databases files directory cnf_stor=Default table storage engine cnf_big-tables=Allow big tables? -cnf_skip-locking=Skip locking of table files? cnf_emysqld=Could not find [mysqld] section in my.cnf cnf_err=Failed to save MySQL server options cnf_eport=Missing or invalid port number diff --git a/mysql/save_cnf.cgi b/mysql/save_cnf.cgi index 47ec3a9a8..c4efcee85 100755 --- a/mysql/save_cnf.cgi +++ b/mysql/save_cnf.cgi @@ -57,9 +57,6 @@ if ($fpt || $in{'fpt'}) { [ $in{'fpt'} ]); } -&save_directive($conf, $mysqld, "skip-locking", - $in{'skip-locking'} ? [ "" ] : [ ]); - &save_directive($conf, $mysqld, "big-tables", $in{'big-tables'} ? [ "" ] : [ ]); From ef3cbdda13ca6b3c1f6c623e679eb4b0d955c410 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 18 Dec 2014 16:53:18 -0800 Subject: [PATCH 08/21] Dalvik user agent is used by mobiile browsers --- miniserv.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/miniserv.pl b/miniserv.pl index 9ab63babd..81fb158ad 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -5421,6 +5421,7 @@ local @prefixes = ( "DoCoMo", # DoCoMo phones "Lynx", # Lynx text-mode linux browser "Links", # Another text-mode linux browser + "Dalvik", # Android browser ); local @substrings = ( "UP.Browser", # Openwave From 38fc48e8931a28a6e72b3a66af2e6d5c85df024b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 18 Dec 2014 20:21:56 -0800 Subject: [PATCH 09/21] Add validation for timeout field https://sourceforge.net/p/webadmin/bugs/4526/ --- mount/lang/en | 1 + mount/linux-lib.pl | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mount/lang/en b/mount/lang/en index 46cfc46b2..4b27f0f9b 100644 --- a/mount/lang/en +++ b/mount/lang/en @@ -297,6 +297,7 @@ linux_resgid=Reserve space for group linux_bg=Retry mounts in background? linux_soft=Return error on timeouts? linux_timeo=Timeout +linux_etimeo=Timeout must be a number linux_retrans=Number of Retransmissions linux_vers=NFS version linux_high=Highest diff --git a/mount/linux-lib.pl b/mount/linux-lib.pl index 48eb97359..1a03da675 100755 --- a/mount/linux-lib.pl +++ b/mount/linux-lib.pl @@ -1805,7 +1805,10 @@ if (($_[0] eq "nfs") || ($_[0] eq "nfs4")) { if ($in{nfs_soft}) { $options{"soft"} = ""; } delete($options{"timeo"}); - if (!$in{nfs_timeo_def}) { $options{"timeo"} = $in{nfs_timeo}; } + if (!$in{nfs_timeo_def}) { + $in{nfs_timeo} =~ /^\d+$/ || &error($text{'linux_etimeo'}); + $options{"timeo"} = $in{nfs_timeo}; + } delete($options{"retrans"}); if (!$in{nfs_retrans_def}) { $options{"retrans"} = $in{nfs_retrans}; } From 593f8ed2324432c6109b68a621350493bae3e034 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 18 Dec 2014 20:23:23 -0800 Subject: [PATCH 10/21] Timeout must be > 0 --- mount/linux-lib.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mount/linux-lib.pl b/mount/linux-lib.pl index 1a03da675..b4087b469 100755 --- a/mount/linux-lib.pl +++ b/mount/linux-lib.pl @@ -1806,7 +1806,8 @@ if (($_[0] eq "nfs") || ($_[0] eq "nfs4")) { delete($options{"timeo"}); if (!$in{nfs_timeo_def}) { - $in{nfs_timeo} =~ /^\d+$/ || &error($text{'linux_etimeo'}); + $in{nfs_timeo} =~ /^\d+$/ && $in{nfs_timeo} > 0 || + &error($text{'linux_etimeo'}); $options{"timeo"} = $in{nfs_timeo}; } From 81a13478a4b64813491158805d5b1c85a8fb3b20 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 18 Dec 2014 23:50:28 -0800 Subject: [PATCH 11/21] Allow manual editing of all config files --- postfix/backup_config.pl | 26 +------------------------- postfix/manual.cgi | 6 ++++-- postfix/manual_update.cgi | 2 +- postfix/postfix-lib.pl | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 28 deletions(-) diff --git a/postfix/backup_config.pl b/postfix/backup_config.pl index 4a3426382..228d8b8f7 100755 --- a/postfix/backup_config.pl +++ b/postfix/backup_config.pl @@ -5,31 +5,7 @@ do 'postfix-lib.pl'; # Returns files and directories that can be backed up sub backup_config_files { -local @rv; - -# Add main config file -push(@rv, $config{'postfix_config_file'}); - -# Add known map files -push(@rv, &get_maps_files("alias_maps")); -push(@rv, &get_maps_files("alias_database")); -push(@rv, &get_maps_files("canonical_maps")); -push(@rv, &get_maps_files("recipient_canonical_maps")); -push(@rv, &get_maps_files("sender_canonical_maps")); -push(@rv, &get_maps_files($virtual_maps)); -push(@rv, &get_maps_files("transport_maps")); -push(@rv, &get_maps_files("relocated_maps")); - -# Add other files in /etc/postfix -local $cdir = &guess_config_dir(); -opendir(DIR, $cdir); -foreach $f (readdir(DIR)) { - next if ($f eq "." || $f eq ".." || $f =~ /\.(db|dir|pag)$/i); - push(@rv, "$cdir/$f"); - } -closedir(DIR); - -return &unique(@rv); +return &get_all_config_files(); } # pre_backup(&files) diff --git a/postfix/manual.cgi b/postfix/manual.cgi index ce361169e..7d45ebaab 100755 --- a/postfix/manual.cgi +++ b/postfix/manual.cgi @@ -7,7 +7,7 @@ $access{'manual'} || &error($text{'cmanual_ecannot'}); &ui_print_header(undef, $text{'cmanual_title'}, ""); # Work out and show the files -@files = ( $config{'postfix_config_file'}, $config{'postfix_master'} ); +@files = &get_all_config_files(); $in{'file'} ||= $files[0]; &indexof($in{'file'}, @files) >= 0 || &error($text{'cmanual_efile'}); print &ui_form_start("manual.cgi"); @@ -19,9 +19,11 @@ print &ui_form_end(); # Show the file contents print &ui_form_start("manual_update.cgi", "form-data"); +print &ui_table_start(undef, undef, 2); print &ui_hidden("file", $in{'file'}),"\n"; $data = &read_file_contents($in{'file'}); -print &ui_textarea("data", $data, 20, 80),"\n"; +print &ui_table_row(undef, &ui_textarea("data", $data, 20, 80), 2); +print &ui_table_end(); print &ui_form_end([ [ "save", $text{'save'} ] ]); &ui_print_footer("", $text{'index_return'}); diff --git a/postfix/manual_update.cgi b/postfix/manual_update.cgi index bd2fab601..a0ba41e42 100755 --- a/postfix/manual_update.cgi +++ b/postfix/manual_update.cgi @@ -7,7 +7,7 @@ $access{'manual'} || &error($text{'cmanual_ecannot'}); &ReadParseMime(); # Work out the file -@files = ( $config{'postfix_config_file'}, $config{'postfix_master'} ); +@files = &get_all_config_files(); &indexof($in{'file'}, @files) >= 0 || &error($text{'cmanual_efile'}); $in{'data'} =~ s/\r//g; if ($in{'file'} eq $files[0]) { diff --git a/postfix/postfix-lib.pl b/postfix/postfix-lib.pl index 3a74fefce..d22616f45 100755 --- a/postfix/postfix-lib.pl +++ b/postfix/postfix-lib.pl @@ -2217,5 +2217,37 @@ my ($cmd) = @_; return &has_command($cmd); } +# get_all_config_files() +# Returns a list of all possible postfix config files +sub get_all_config_files +{ +my @rv; + +# Add main config file +push(@rv, $config{'postfix_config_file'}); +push(@rv, $config{'postfix_master'}); + +# Add known map files +push(@rv, &get_maps_files("alias_maps")); +push(@rv, &get_maps_files("alias_database")); +push(@rv, &get_maps_files("canonical_maps")); +push(@rv, &get_maps_files("recipient_canonical_maps")); +push(@rv, &get_maps_files("sender_canonical_maps")); +push(@rv, &get_maps_files($virtual_maps)); +push(@rv, &get_maps_files("transport_maps")); +push(@rv, &get_maps_files("relocated_maps")); + +# Add other files in /etc/postfix +local $cdir = &guess_config_dir(); +opendir(DIR, $cdir); +foreach $f (readdir(DIR)) { + next if ($f eq "." || $f eq ".." || $f =~ /\.(db|dir|pag)$/i); + push(@rv, "$cdir/$f"); + } +closedir(DIR); + +return &unique(@rv); +} + 1; From 4c11ecfaa35a0556c9963f8f3708062fb91b5bd1 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 19 Dec 2014 15:16:52 -0800 Subject: [PATCH 12/21] Fix chart that disappeared --- gray-theme/right.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gray-theme/right.cgi b/gray-theme/right.cgi index 30ab3a283..4b968a12f 100755 --- a/gray-theme/right.cgi +++ b/gray-theme/right.cgi @@ -44,7 +44,7 @@ foreach my $info (@info) { foreach my $t (@{$info->{'table'}}) { my $chart = ""; if ($t->{'chart'}) { - my $chart = &make_bar_chart( + $chart = &make_bar_chart( $t->{'chart'}); $chart = "
".$chart; } From a44eb9cd3db0b565f1b0a6bca595be599a87111c Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 19 Dec 2014 15:22:47 -0800 Subject: [PATCH 13/21] Support openable status blocks --- gray-theme/right.cgi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gray-theme/right.cgi b/gray-theme/right.cgi index 4b968a12f..029aa5303 100755 --- a/gray-theme/right.cgi +++ b/gray-theme/right.cgi @@ -38,7 +38,10 @@ foreach my $info (@info) { $info->{'level'} || 'warn'); } else { - print &ui_table_start($info->{'desc'}, "width=600", 2); + my $open = defined($info->{'open'}) ? $info->{'open'} : 1; + print &ui_hidden_table_start($info->{'desc'}, "width=600", 2, + $info->{'id'} || $info->{'module'}, + $open); if ($info->{'type'} eq 'table') { # A table of various labels and values foreach my $t (@{$info->{'table'}}) { @@ -69,7 +72,7 @@ foreach my $info (@info) { # A chunk of HTML print &ui_table_row(undef, $info->{'html'}, 2); } - print &ui_table_end(); + print &ui_hidden_table_end(); print "

\n"; } } From 521cfd6afdda198a8cb9592c79aa358e78bb5db1 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 19 Dec 2014 17:09:50 -0800 Subject: [PATCH 14/21] Support links on right frame, and add one to refresh system info --- gray-theme/right.cgi | 11 +++++++++++ system-status/lang/en | 1 + system-status/recollect.cgi | 8 ++++++++ system-status/system_info.pl | 10 +++++++++- web-lib-funcs.pl | 7 +++++-- 5 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 system-status/recollect.cgi diff --git a/gray-theme/right.cgi b/gray-theme/right.cgi index 029aa5303..7d60ad426 100755 --- a/gray-theme/right.cgi +++ b/gray-theme/right.cgi @@ -23,6 +23,16 @@ my $prehead = defined(&WebminCore::theme_prehead) ? &popup_header(undef, $prehead); print "

\n"; +# Links appear at the top of the page +my @links = grep { $_->{'type'} eq 'link' } @info; +@info = grep { $_->{'type'} ne 'link' } @info; +if (@links) { + my @linkshtml = map { &ui_link($_->{'link'}, $_->{'desc'}) } @links; + print "
\n"; + print &ui_links_row(\@linkshtml); + print "
\n"; + } + # Webmin logo if (&get_product_name() eq 'webmin') { print "

\n"; @@ -34,6 +44,7 @@ if (&get_product_name() eq 'webmin') { foreach my $info (@info) { if ($info->{'type'} eq 'warning') { + # An alert message print &ui_alert_box($info->{'warning'}, $info->{'level'} || 'warn'); } diff --git a/system-status/lang/en b/system-status/lang/en index d646068a1..eb769dd83 100644 --- a/system-status/lang/en +++ b/system-status/lang/en @@ -36,3 +36,4 @@ right_updates=Package updates right_upok=All installed packages are up to date right_upneed=$1 package updates are available right_upsec=$1 package updates are available, of which $2 are security updates +right_recollect=Refresh system information diff --git a/system-status/recollect.cgi b/system-status/recollect.cgi new file mode 100644 index 000000000..37b9e98f5 --- /dev/null +++ b/system-status/recollect.cgi @@ -0,0 +1,8 @@ +#!/usr/local/bin/perl +# Refresh background collected info + +use strict; +use warnings; +require './system-status-lib.pl'; +&scheduled_collect_system_info(); +&redirect($ENV{'HTTP_REFERER'}); diff --git a/system-status/system_info.pl b/system-status/system_info.pl index ea3f1ca56..f4f5dc801 100644 --- a/system-status/system_info.pl +++ b/system-status/system_info.pl @@ -2,7 +2,7 @@ use strict; use warnings; require 'system-status-lib.pl'; -our (%text, %gconfig); +our (%text, %gconfig, $module_name, %config); # list_system_info(&data, &in) # Returns general information about the system, such as available disk space @@ -12,6 +12,14 @@ my $info = &get_collected_info(); my @rv; my @table; +# Refresh button for root +if (&foreign_available($module_name) && $config{'collect_interval'} ne 'none') { + push(@rv, { 'type' => 'link', + 'desc' => $text{'right_recollect'}, + 'link' => '/'.$module_name.'/recollect.cgi' }); + } + +# Table of system info my $table = { 'type' => 'table', 'desc' => $text{'right_header'}, 'table' => \@table }; diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 9a5e3e9d8..426e48986 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -10110,7 +10110,8 @@ to display. Each is a hash ref with the following keys : =item type - Can be "html" for an arbitrary block of HTML, "table" for a table of information, "usage" for a table of usage of some resource, "redirect" for a request to redirect the whole page to another URL, - or "warning" for a warning dialog. + "warning" for a warning dialog, or "link" for a link to another + page. =item desc - The title for this section of info @@ -10134,6 +10135,8 @@ to display. Each is a hash ref with the following keys : =item level - In "warning" mode, can be one of "success", "info", "warn" or "danger" +=item link - In "link" mode, the destination URL + For "table" mode, the keys in each hash ref are : =item desc - Label for this item @@ -10165,7 +10168,7 @@ use where a system info block has a form that submits to itself. sub list_combined_system_info { my ($data, $in) = @_; -foreach my $m (&get_available_module_infos()) { +foreach my $m (&get_all_module_infos()) { my $dir = &module_root_directory($m->{'dir'}); my $mfile = "$dir/system_info.pl"; next if (!-r $mfile); From 8838cf6b507756187a3a748f8655b118a20b6405 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 19 Dec 2014 19:37:30 -0800 Subject: [PATCH 15/21] Support for wide table rows --- system-status/system_info.pl | 9 ++++++--- web-lib-funcs.pl | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/system-status/system_info.pl b/system-status/system_info.pl index f4f5dc801..0c5281be8 100644 --- a/system-status/system_info.pl +++ b/system-status/system_info.pl @@ -77,7 +77,8 @@ if ($info->{'cputemps'}) { int($t->{'temp'})."℃"); } push(@table, { 'desc' => $text{'right_cputemps'}, - 'value' => join(" ", @temps) }); + 'value' => join(" ", @temps), + 'wide' => 1 }); } if ($info->{'drivetemps'}) { my @temps; @@ -98,7 +99,8 @@ if ($info->{'drivetemps'}) { push(@temps, $short.": ".$t->{'temp'}."℃".$emsg); } push(@table, { 'desc' => $text{'right_drivetemps'}, - 'value' => join(" ", @temps) }); + 'value' => join(" ", @temps), + 'wide' => 1 }); } @@ -196,7 +198,8 @@ if ($info->{'poss'}) { $msg = &ui_link("/package-updates/index.cgi?mode=updates", $msg); } push(@table, { 'desc' => $text{'right_updates'}, - 'value' => $msg }); + 'value' => $msg, + 'wide' => 1 }); } return @rv; diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 426e48986..782403026 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -10148,6 +10148,8 @@ For "table" mode, the keys in each hash ref are : a different color. Any leftover is assumed is filled in with the final color. +=item wide - Set to 1 if this item should span a whole row + =item header - Text to show above the table For "usage" mode, the keys in each hash ref are : From 77c87bc2288e47b118c52873563b46a37f25873b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 20 Dec 2014 12:21:15 -0800 Subject: [PATCH 16/21] Catalan update from Jaume Badiella --- apache/lang/ca | 2 + firewall/lang/ca | 2 +- gray-theme/lang/ca | 7 +-- iscsi-tgtd/config.info.ca | 9 ++++ iscsi-tgtd/lang/ca | 105 ++++++++++++++++++++++++++++++++++++++ iscsi-tgtd/module.info | 2 + logrotate/lang/ca | 3 ++ lvm/lang/ca | 4 +- 8 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 iscsi-tgtd/config.info.ca create mode 100644 iscsi-tgtd/lang/ca diff --git a/apache/lang/ca b/apache/lang/ca index 627dca42a..e30dade02 100644 --- a/apache/lang/ca +++ b/apache/lang/ca @@ -359,6 +359,8 @@ core_ehlimit=$1 no core_dport=Port per defecte: core_address=Adreça core_port=Port +core_portname=Protocol +core_protoany=<Qualsevol> core_listen=Escolta les adreces i els ports core_eaddress='$1' no és una adreça vàlida core_eport='$1' no és un port vàlid diff --git a/firewall/lang/ca b/firewall/lang/ca index 9e1777ce3..49c40043e 100644 --- a/firewall/lang/ca +++ b/firewall/lang/ca @@ -125,7 +125,7 @@ desc_conds=Si $1 desc_and=i desc_always=Sempre -redhat_escript=No s'ha trobat al sistema el script d'inici d'IPTables de Redhat. +redhat_einstalled=No s'ha trobat cap acció d'engegada iptables que indiqui que el paquet IPtables no està instal·lat al sistema redhat_eoutput=S'ha produït un error en buscar l'estat d'IPtables amb l'ordre $1. Això probablement indica que el sistema està configurat per utilitzar IPchains en lloc d'IPtables. gentoo_escript=No s'ha trobat al sistema el script $1 d'inici d'IPtables Gentoo. diff --git a/gray-theme/lang/ca b/gray-theme/lang/ca index 3cc259cc1..2ac21b28f 100644 --- a/gray-theme/lang/ca +++ b/gray-theme/lang/ca @@ -17,10 +17,6 @@ right_webmin=Versi right_usermin=Versió Usermin right_cpu=Càrrega mitjana de la CPU right_cpuinfo=Informació del processador -right_cputemps=Temperatures de la CPU -right_drivetemps=Temperatures dels discs -right_driveerr=$1 errors! -right_drivefailed=La comprovació SMART ha fallat! right_cputype=$5, $8 nuclis right_load=$1 (1 min) $2 (5 mins) $3 (15 mins) right_cpuuse=Ús de la CPU @@ -29,8 +25,7 @@ right_real=Mem right_virt=Memòria virtual right_procs=Processos en execució right_disk=Espai local en disc -right_used=$1 utilitzat, $2 total -right_used2=$2 utilitzat, $1 garantit, $3 explotable +right_used=$1 total, $2 utilitzat right_out=$1 de $2 right_quota=Ús del disc i quota right_header5=Informació del Compte diff --git a/iscsi-tgtd/config.info.ca b/iscsi-tgtd/config.info.ca new file mode 100644 index 000000000..8c8f068ae --- /dev/null +++ b/iscsi-tgtd/config.info.ca @@ -0,0 +1,9 @@ +config_file=FItxer de configuració de iSCSI TGTD,0 +add_file=Afegeix objectius nous a,3,Fitxer primari de configuració +tgtd=Camí complet de l'ordre tgtd,0 +tgtadm=Camí complet de l'ordre tgtadm,0 +tgtadmin=Camí complet de l'ordre tgt-admin,0 +init_name=Nom del script d'engegada,0 +start_cmd=Ordre per iniciar iSCSI TGTd,3,Inicia el script d'engegada +stop_cmd=Ordre per aturar iSCSI TGTd,3,Atura el script d'engegada +restart_cmd=Ordre per reiniciar iSCSI TGTd,3,Reinicia el script d'engegada diff --git a/iscsi-tgtd/lang/ca b/iscsi-tgtd/lang/ca new file mode 100644 index 000000000..c8a12c821 --- /dev/null +++ b/iscsi-tgtd/lang/ca @@ -0,0 +1,105 @@ +check_econfigset=No s'ha establert cap fitxer de configuració iSCSI TGTd! +check_econfig=No s'ha trobat al sistema el fitxer de configuració $1 de iSCSI TGTd. +check_etgtadm=No s'ha trobat al sistema l'ordre d'administració $1 de iSCSI TGTd. +check_einit=L'acció d'engegada $1 no existeix + +index_title=iSCSI TGTd +index_clink=Pot ser que no estigui instal·lat, o bé que la configuració del mòdul sigui incorrecta. +index_stop=Atura iSCSI TGTd +index_stopdesc=Fes clic sobre aquest botó per aturar l'objectiu iSCSI en execució. Els dispositius compartits ja no seran accessibles per part dels clients. +index_start=Inicia iSCSI TGTd +index_startdesc=Fes clic sobre aquest botó per iniciar l'objectiu iSCSI, de manera que els dispositius compartits siguin accessibles per part dels clients. +index_restart=Reinicia iSCSI TGTd +index_restartdesc=Fes clic sobre aquest botó per aplicar la configuració actual reiniciant l'objectiu iSCSI. +index_atboot=Inicia en engegar el sistema +index_atbootdesc=Canvia aquesta opció per controlar si l'objectiu iSCSI s'inicia en engegar el sistema o no. Si actualment no s'inicia en engegar i tries Sí, es crearà un nou script d'inicialització. +index_manual=Edició dels Fitxers de Configuració +index_manualdesc=Edita manualment qualsevol dels fitxers de configuració de l'objectiu iSCSI per a fer canvis no suportats per Webmin. +index_return=a la llista d'objectius +index_none=Encara no s'ha definit cap objectiu iSCSI per exportar. +index_add=Afegeix un nou objectiu iSCSI. +index_target=Nom de l'objectiu +index_delete=Suprimeix els Objectius Seleccionats +index_lun=Dispositius de disc +index_users=Usuaris permesos +index_size=Mida total +index_noluns=Cap +index_nousers=Qualsevol + +dtargets_err=No s'han pogut suprimir els objectius. +dtargets_enone=No n'hi ha cap de seleccionat! + +target_title1=Creació d'Objectiu iSCSI +target_title2=Edició d'Objectiu iSCSI +target_header=Opcions del dispositiu compartit iSCSI +target_part=Partició del disc local +target_raid=Dispositiu RAID +target_md=Dispositiu RAID $1 +target_lvm=Volum lògic LVM +target_lv=GV LVM $1, VL $2 +target_other=Un altre fitxer o dispositiu +target_lun=Dispositiu $1 a compartir +target_name=Nom de l'objectiu +target_egone=L'objectiu seleccionat ja no existeix! +target_none=Res +target_null=Disc RAM temporal de mida +target_sectors=sectors +target_fileio=Basat en fitxers +target_blockio=Basat en blocs (sense cau, només per a dispositius) +target_iomode=Mode E/S +target_wt=Cau write-through +target_wb=Cau write-back +target_ro=Només lectura +target_iuser=Autenticació per part dels clients +target_iuserall=No cal autenticació +target_iuserbelow=Permet les entrades de sota... +target_uname=Usuari +target_upass=Contrasenya +target_ouser=Autenticació cap als clients +target_ousernone=No autentiquis +target_ousername=Entrada amb usuari +target_ouserpass=i contrasenya +target_err=No s'ha pogut desar l'objectiu +target_esectors=Hi falta el nombre de sectors del dispositiu $1 o bé no és numèric +target_eother=Hi falta el fitxer del dispositiu $1 o bé és invàlid +target_eiuser=El nom de l'usuari $1 és invàlid - no s'hi permeten espais +target_eipass=La contrasenya de l'usuari $1 és invàlida - no s'hi permeten espais +target_eouser=Hi falta l'usuari per autenticar-se cap als clients o bé és invàlid - no s'hi permeten espais +target_eopass=Hi falta la contrasenya per autenticar-se cap als clients o bé és invàlida - no s'hi permeten espais +target_eiusernone=No has introduït cap usuari client +target_iaddress=Permet connexions des de les adreces +target_iname=Permet connexions des dels iniciadors +target_iall=Tots +target_ibelow=Introduïts a sota... +target_type=Tipus d'emmagatzematge +target_backing=Backing store +target_direct=Accés directe al dispositiu +target_cache=El cau escriu sobre el dispositiu +target_eaddr=L'adreça IP permesa és invàlida +target_eaname=El nom de l'iniciador permès és invàlid + +start_err=No s'ha pogut iniciar iSCSI TGTd +stop_err=No s'ha pogut aturar iSCSI TGTd +restart_err=No s'ha pogut reiniciar iSCSI TGTd +atboot_err=No s'ha pogut activar en engegar el sistema +atboot_einit=El script d'inicialització $1 no existeix + +log_create_target=S'ha creat l'objectiu $1 +log_delete_target=S'ha suprimit l'objectiu $1 +log_modify_target=S'ha modificat l'objectiu $1 +log_delete_targets=S'han suprimit $1 objectius +log_start=S'ha iniciat el servidor iSCSI +log_stop=S'ha aturat el servidor iSCSI +log_restart=S'ha reiniciat el servidor iSCSI +log_atboot=S'ha activat el servidor iSCSI en engegar el sistema +log_delboot=S'ha desactivat el servidor iSCSI en engegar el sistema +log_manual=S'ha editat manualment el fitxer de configuració + +manual_title=Edició del Fitxer de Configuració +manual_file=Selecciona el fitxer a editar: +manual_ok=Obre +manual_desc=Utilitza la caixa de text de sota per editar el fitxer de configuració $1 del servidor iSCSI. Ves amb compte, perquè no s'efectuarà cap mena de validació del que hi introdueixis! +manual_err=No s'ha pogut desar el fitxer de configuració +manual_edata=No has introduït contingut! +manual_efile=El fitxer de configuració és invàlid! + diff --git a/iscsi-tgtd/module.info b/iscsi-tgtd/module.info index c4c3ebc43..fc5d2185b 100644 --- a/iscsi-tgtd/module.info +++ b/iscsi-tgtd/module.info @@ -5,3 +5,5 @@ depends=fdisk lvm raid init longdesc=Share disk devices across the network using the iSCSI protocol with the TGTd package. desc_de=iSCSI TGTd longdesc_de=Teilt Plattengeräte über das Netzwerk mit dem iSCSI-Protokoll mit dem TGTd Paket. +desc_ca=iSCSI TGTd +longdesc_ca=Compartició de dispositius de disc a través de la xarxa utilitzant el protocol iSCSI amb el paquet TGTd. diff --git a/logrotate/lang/ca b/logrotate/lang/ca index 13a56a0a4..58e856a6d 100644 --- a/logrotate/lang/ca +++ b/logrotate/lang/ca @@ -39,6 +39,8 @@ edit_ifempty=Rota encara que el fitxer de registre estigui buit edit_missingok=Ignora el fitxer de registre si no hi és edit_size=Mida màxima abans de rotar edit_always=Ignorada +edit_minsize=Mida mínima a rotar +edit_nominsize=Sempre edit_ext=Extensió dels noms de fitxer rotats edit_dateext=Utilitza l'extensió de la data per als fitxers rotats edit_mail=Envia el fitxer de registre per correu abans d'esborrar-lo @@ -69,6 +71,7 @@ global_header=Opcions per defecte de tots els fitxers de registre save_err=No s'ha pogut desar el registre save_efile=Hi falta el nom del fitxer de registre o bé és invàlid save_esize=Hi falta la mida màxima o bé és invàlida +save_eminsize=Hi falta la mida mínima o bé és invàlida save_erotate=Hi falta el nombre màxim de registres vells a mantenir o bé és invàlid save_ecreatemode=Hi falta el mode de creació de 3 o 4 dígits octals o bé és invàlid save_ecreateuser=Hi falta l'usuari de creació o bé és invàlid diff --git a/lvm/lang/ca b/lvm/lang/ca index e6191175d..66cf649d6 100644 --- a/lvm/lang/ca +++ b/lvm/lang/ca @@ -29,8 +29,8 @@ index_pvvg=Al grup de volums index_pvsize=Mida del dispositiu index_pvtotal=Blocs utilitzats index_pvtotal2=Mida utilitzada -index_vgsdesc=Un grup de volums és un conjunt de discs sobre els quals es pot allotjar un o més volums lògics. La majoria de sistemes només en tindran un, i almenys se n'ha de crear un abans de poder-hi posar volums físics o lògics. -index_pvsdesc=Un volum físic ñes una partició de disc o dispositiu RAID que és part d'un grup de volums. Llavors, l'espai del disc es pot utilitzar per a un o més volums físics. +index_vgsdesc=Un grup de volums és un conjunt de discs sobre els quals es pot allotjar un o més volums lògics. La majoria de sistemes només en tindran un, i almenys se n'ha de crear un abans de poder-hi afegir volums físics o lògics. +index_pvsdesc=Un volum físic és una partició de disc o dispositiu RAID que és part d'un grup de volums. Llavors, l'espai del disc es pot utilitzar per a un o més volums físics. index_lvsdesc=Un volum lògic és una partició virtual creada amb l'espai combinat d'un grup de volums. Cadascun pot contenir un sistema de fitxers que es munta per a emmagatzemar fitxers. index_lvname=Volum lògic index_lvvg=Grup de volums From e0a1b43518fbc7ec0cb208e78f1e86fe1fe30b63 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 20 Dec 2014 12:21:36 -0800 Subject: [PATCH 17/21] Catalan update from Jaume Badiella --- mailboxes/lang/ca | 12 +++++++++++ mysql/config.info.ca | 2 +- raid/lang/ca | 33 +++++++++++++++++++++--------- servers/lang/ca | 1 + smart-status/lang/ca | 6 ++++++ software/config.info.ca | 2 +- software/lang/ca | 6 ++++++ theme-stressfree/lang/ca | 43 ++++++++++++++++++++++++++++++++++++++++ webmin/lang/ca | 1 + 9 files changed, 95 insertions(+), 11 deletions(-) create mode 100644 theme-stressfree/lang/ca diff --git a/mailboxes/lang/ca b/mailboxes/lang/ca index 67e899a1f..eb71c564e 100644 --- a/mailboxes/lang/ca +++ b/mailboxes/lang/ca @@ -438,4 +438,16 @@ delall_ok=Suprimeix-los Ara slide_title=Imatges Adjuntes slide_prev=Anterior slide_next=Següent + +left_mail=Correu +left_search=Cerca: +left_folders=Gestiona Carpetes +left_addresses=Llibreta d'Adreces +left_prefs=Preferències de Correu +left_forward=Reenviament de Correu +left_autoreply=Resposta Automàtica +left_filter=Filtres de Correu +left_pass=Canvi de Contrasenya +left_sig=Edició de Signatura + __norefs=1 diff --git a/mysql/config.info.ca b/mysql/config.info.ca index b20a4ea38..f619711a8 100644 --- a/mysql/config.info.ca +++ b/mysql/config.info.ca @@ -1,4 +1,4 @@ -line1=Opcions configurable,11 +line1=Opcions configurables,11 login=Usuari d'administració,3,Automàtic pass=Contrasenya d'administració,12 perpage=Nombre de files per pàgina a mostrar,0,5 diff --git a/raid/lang/ca b/raid/lang/ca index 4b98dd5b4..0d9bfa618 100644 --- a/raid/lang/ca +++ b/raid/lang/ca @@ -8,7 +8,7 @@ index_mdadm=S'est index_raidtools=S'està utilitzant RaidTools index_name=Nom de dispositiu index_active=Actiu -index_errors=Errors +index_status=Estat index_level=Nivell RAID index_size=Mida utilitzable index_members=Dispositius de disc del member @@ -17,18 +17,17 @@ index_mailaddr=Envia les notificacions a index_mailaddrnone=No enviïs index_mailfrom=Adreça From: de les notificacions index_mailfromnone=Per defecte (root) -create_missing=Inclou el disc que falta actualment index_program=Ordre a executar quen es detecta un problema index_programnone=No n'executis cap index_monitor=Monitorització activada -linear=Concatenat (Lineal) -raid0=A tires (RAID0) -raid1=Replicat (RAID1) -raid4=Amb paritat (RAID4) -raid5=Redundant (RAID5) -raid6=Redundant dual (RAID6) -raid10=A tires i Replicat (RAID10) +linear=Lineal (Concatenat) +raid0=RAID0 (A tires) +raid1=RAID1 (Replicat) +raid4=RAID1 (Paritat Dedicada) +raid5=RAID5 (Paritat Distribuïda) +raid6=RAID6 (Paritat Dual Distribuïda) +raid10=RAID10 (A tires i Replicat) blocks=blocs create_title=Creació de Dispositiu RAID @@ -38,6 +37,7 @@ create_level=Nivell RAID create_disks=Particions RAID create_spares=Particions esgrunades create_pdisk=Partició amb paritat +create_missing=Inclou el disc que falta actualment create_pauto=Automàtic create_nodisks=No hi ha particions lliures disponibles per al RAID. create_super=Superbloc persistent @@ -57,6 +57,12 @@ create_nogroup=Cap (utilitza nom create_oldgroup=Grup existent create_newgroup=Nou grup create_enewgroup=Hi falta el nom del grup d'esgrunats o bé no és alfanumèric +create_n2_layout=2 Near Còpies Pròximes +create_f2_layout=2 Còpies Llunyanes +create_o2_layout=2 Còpies Offset +create_n3_layout=3 Copies Pròximes +create_f3_layout=3 Copies Llunyanes +create_o3_layout=3 Còpies Offset view_title=Dispositiu RAID view_header=Opcions de dispositiu RAID @@ -95,6 +101,8 @@ view_remove=Elimina la partici view_removedesc=Selecciona una partició que és part del dispositiu RAID i fes clic sobre aquest botó per eliminar-la. Això pot provocar que es perdin dades! view_remove_det=Elimina les no vinculades view_remove_detdesc=Elimina les particions que ja estan físicament desvinculades del sistema. +view_replace=Substitueix la partició: +view_replacedesc=Selecciona la partició a substituir (Substitució en Calent) view_grow=Fes créixer el RAID: view_convert_to_raid6=Converteix a RAID6 view_convert_to_raid6desc=Converteix el nivell RAID a RAID6 afegint una o més unitats. @@ -127,6 +135,7 @@ emdadmcreate=mdadm en mode --create ha fallat: $1 emdadmadd=mdadm en mode --manage --add ha fallat: $1 emdadmgrow=mdadm en mode --grow ha fallat: $1 emdadmremove=mdadm en mode --manage --remove ha fallat: $1 +emdadmreplace=mdadm en mode --manage --replace ha fallat: $1 emdadmfail=mdadm en mode --manage --fail ha fallat: $1 log_create=S'ha creat el dispositiu RAID $1 $2 @@ -136,6 +145,7 @@ log_delete=S'ha suprimit el dispositiu RAID $1 log_mkfs=S'ha creat el sistema de fitxers $1 a $2 log_add=S'ha afegit la partició $2 al dispositiu RAID $1 log_remove=S'ha eliminat la partició $2 del dispositiu RAID $1 +log_replace=S'ha substituït en calent la partició $2 del dispositiu RAID $1 amb la partició $3 log_grow=S'ha fet créixer el dispositiu RAID $1 a un total de $2 discs log_convert_to_raid6=S'ha convertit el dispositiu RAID5 $1 a un dispositiu RAID6 log_convert_to_raid5=S'ha convertit el dispositiu RAID6 $1 a un dispositiu RAID5 @@ -150,4 +160,9 @@ delete_title=Supressi delete_rusure=Segur que vols suprimir l'array RAID $1, que utilitza $2 d'espai al disc? delete_ok=Sí, Suprimeix-lo delete_eidx=No has seleccionat cap array RAID! + +remove_title=Eliminació de Partició de l'Array RAID +remove_rusure=Segur que vols eliminar la partició $2 de l'array RAID $1? +remove_ok=Sí, Treu-la +remove_eidx=No has seleccionat cap array RAID! __norefs=1 diff --git a/servers/lang/ca b/servers/lang/ca index de5914672..a700a0853 100644 --- a/servers/lang/ca +++ b/servers/lang/ca @@ -73,6 +73,7 @@ find_title=Recerca de Servidors find_new=S'ha trobat un servidor nou a $1 find_but=S'ha trobat un servidor nou a $1, però l'autenticació ha fallat: $2 find_already=S'ha trobat un servidor ja conegut a $1 +find_already2=S'ha trobat un host servidor a $1 find_skip=S'està ignorant el servidor a $1 find_me=S'ha trobat aquest servidor a $1 find_escan=La xarxa a escanejar ha de ser una adreça de classe C. diff --git a/smart-status/lang/ca b/smart-status/lang/ca index fb07ac8ec..a2f62e09b 100644 --- a/smart-status/lang/ca +++ b/smart-status/lang/ca @@ -24,8 +24,10 @@ index_return=a l' index_family=Família del model index_serial=Número de sèrie index_capacity=Capacitat +index_norm=Normalitzat: monitor_type=Comprovació d'Unitat SMART Drive Check +monitor_type2=Desgast SSD monitor_drive=Unitat a comprovar monitor_errors=Comprova també el registre d'errors monitor_errorsinc=Sí, però avisa només si s'incrementa el recompte @@ -35,6 +37,10 @@ monitor_nosuch=Aquesta unitat no existeix monitor_nosmart=No hi ha suport SMART monitor_errorsfound=S'ha informat de $1 errors monitor_errorsinced=Els errors s'han incrementat de $2 a $1 +monitor_wearlevel=Falla si el nivell de desgast cau petr sota de +monitor_ewearlevel=El percentatge de nivell de desgast és invàlid +monitor_nowearout=La unitat no reconeix cap indicador de desgast SSD +monitor_wornout=El nivell de desgast ha caigut a $1 short_title=Auto Test Breu short_doing=S'està iniciant l'auto test breu del $1... diff --git a/software/config.info.ca b/software/config.info.ca index 12bb2e496..f86366010 100644 --- a/software/config.info.ca +++ b/software/config.info.ca @@ -1,3 +1,3 @@ package_system=Sistema de gestió de paquets,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo,cygwin-Cygwin,msi-Instal·lador Microsoft -update_system=Sistema d'actualització de paquets,1,-Detecta'l automàticament,apt-APT,yum-YUM,rhn-Xarxa de Redhat,csw-CSW Blastwave,urpmi-URPMI,emerge-Emerge,ports-Ports,*-Cap +update_system=Sistema d'actualització de paquets,1,-Detecta'l automàticament,apt-APT,yum-YUM,rhn-Xarxa de Redhat,csw-CSW Blastwave,urpmi-URPMI,emerge-Emerge,ports-FreeBSD Ports,pkg-FreeBSD pkgng,*-Cap apt_mode=Ordre a utilitzar per a les instal·lacions APT,1,0-apt-get,1-aptitude diff --git a/software/lang/ca b/software/lang/ca index 59f5f2374..aafd481f3 100644 --- a/software/lang/ca +++ b/software/lang/ca @@ -406,4 +406,10 @@ ports_apply=Descarrega la Darrera Versi ports_upgrade=S'està Descarregant la Darrera Versió ports_running=S'està executant l'ordre $1... +pkg_install=S'estan instal·lant els paquets FreeBSD $1... +pkg_failed=...alguns paquets han fallat +pkg_ok=...instal·lació completa +pkg_find=Cerca pkgng +pkg_input=Paquet de pkgng + __norefs=1 diff --git a/theme-stressfree/lang/ca b/theme-stressfree/lang/ca new file mode 100644 index 000000000..49723da4d --- /dev/null +++ b/theme-stressfree/lang/ca @@ -0,0 +1,43 @@ +theme_close=Tanca +theme_cancel=Cancel·la +theme_search=Cerca +theme_print=Imprimeix +theme_upload=Puja Fitxer +donate_thankyou=Gràcies pel teu donatiu +sidebar_open=Mostra la barra lateral +sidebar_close=Tanca la barra lateral +sidebar_refresh=Refresca +sidebar_header0=Informació del Sistema +sidebar_host=Nom de host +sidebar_os=Sistema operatiu +sidebar_login=Registrat com a +sidebar_from=Registrat des de +sidebar_webmin=Versió de Webmin +sidebar_usermin=Versió d'Usermin +sidebar_cpu=Càrregues mitjanes de la CPU +sidebar_load=$1 (1 min) $2 (5 mins) $3 (15 mins) +sidebar_real=Memòria real +sidebar_virt=Memòria virtual +sidebar_procs=Processos en execució +sidebar_disk=Espai del disc local +sidebar_used=$1 total, $2 utilitzats +sidebar_out=$1 de $2 +sidebar_quota=Ús del disc i quota +sidebar_header5=Informació del compte +sidebar_uquota=Quota del disc i ús +sidebar_time=Hora del servidor +gears_title=Gears +gears_install=Instal·la Gears +gears_enable=Activa Gears +gears_warning=Gears no s'hauria d'activar en un servidor públio i/o compartit +gears_msg1_title=Accelera Webmin +gears_msg1_s1=Aquest tema de Webmin suporta Google Gears per accelerar la càrrega de pàgines posant en cau local imatges, scripts i fitxers CSS +gears_msg1_s2=Més informació quant a Google Gears +gears_msg2_title=Estat de Gears +gears_msg2_s1=Gears està instal·lat en aquest ordinador però no està activatper a ser utilitzat amb aquest lloc Webmin +gears_msg2_s2=Per activar-ho, assegura't que aquest URL no està a la llista de denegació de la Configuració de Gears (la menú d'Eines del navegador), llavors fes clic a Activa Gears +gears_msg3_title=Estat de Gears +gears_msg3_s1=Gears està instal·lat i activat en aquest ordinador. Pots desactivar-ho des del menú d'Eines del teu navegador +gears_msg3_s2=Si hi ha algun error, prova a desactivar Gearsm recarregar la pàgina, i tornar-ho a activar +gears_msg3_s3=Estat de l'emmagatzematge local: +gears_msg4_s1=Versió del manifest: diff --git a/webmin/lang/ca b/webmin/lang/ca index 451fe9bb5..40b92554b 100644 --- a/webmin/lang/ca +++ b/webmin/lang/ca @@ -325,6 +325,7 @@ ssl_cert=Fitxer de certificat ssl_cert_def=El mateix de la clau privada ssl_cert_oth=Fitxer a part ssl_redirect=Redirecciona les peticions no SSL a mode SSL +ssl_deny=Versions del protocol SSL a rebutjar ssl_compression=Permet les connexions SSL comprimides ssl_honorcipherorder=Força l'ús de l'ordre de xifratge definit pel servidor ssl_extracas=Fitxers addicionals de certificat
(per a certificats encadenats) From a4b5951ddafc474505b4031540aa791a0e1bbc86 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 20 Dec 2014 12:22:32 -0800 Subject: [PATCH 18/21] give credit for translations --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a57f723ee..b56df9814 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -210,3 +210,5 @@ Added additional protected against Shellshock exploits made via the Webmin webse SSL v2 and v3 are now disabled by default at Webmin install time, to block the POODLE attack. They can be re-enabled on the SSL Encryption page of the Webmin Configuration module. ---- Changes since 1.720 ---- Deprecated the old blue-theme in favor of the new gray-theme. +Catalan translation updates from Jaume Badiella. +More German translation updates, thanks to Raymond Vetter. From e9030b6d2d7f1b65a06897b13b83a2f75f0d283f Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 20 Dec 2014 12:23:34 -0800 Subject: [PATCH 19/21] Catalan updates --- filter/config.info.ca | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/config.info.ca b/filter/config.info.ca index 714c78c2c..e0eb5ab02 100755 --- a/filter/config.info.ca +++ b/filter/config.info.ca @@ -1,5 +1,5 @@ -virtualmin_config=Camí complet del directori de configuracio de Virtualmin,3,No instal·lat -virtualmin_spam=Camí complet del programa de consulta d'usuaris de spam de Virtualmin,3,No instal·lat,40 +virtualmin_spam=Camí complet del programa de consulta de spam d'usuaris de Virtualmin,3,No està instal·lat,40 +virtualmin_config=Camí complet del directori de configuració de Virtualmin,3,No instal·lat warn_procmail=Mostra un avís si Procmail no està instal·lat,1,1-Sí,0-No forward_procmail=Crea fitxer .forward per executar procmail,1,1-Sí,0-No alias_files=Camí complet dels fitxers d'àlies globals,9,40,3,\t From 3293374843e29d53df07aef4ae5770c7d3319188 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 20 Dec 2014 13:57:37 -0800 Subject: [PATCH 20/21] Support new param for link target --- gray-theme/right.cgi | 6 +++++- web-lib-funcs.pl | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gray-theme/right.cgi b/gray-theme/right.cgi index 7d60ad426..569c54a04 100755 --- a/gray-theme/right.cgi +++ b/gray-theme/right.cgi @@ -27,7 +27,11 @@ print "

\n"; my @links = grep { $_->{'type'} eq 'link' } @info; @info = grep { $_->{'type'} ne 'link' } @info; if (@links) { - my @linkshtml = map { &ui_link($_->{'link'}, $_->{'desc'}) } @links; + my @linkshtml = map { + &ui_link($_->{'link'}, $_->{'desc'}, undef, + $_->{'target'} eq 'new' ? 'target=_blank' : + $_->{'target'} eq 'window' ? 'target=_top' : '') + } @links; print "
\n"; print &ui_links_row(\@linkshtml); print "
\n"; diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 782403026..39acba115 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -10137,6 +10137,9 @@ to display. Each is a hash ref with the following keys : =item link - In "link" mode, the destination URL +=item target - In "link" mode, can be "new" for a new page, or "window" for the + current whole browser window + For "table" mode, the keys in each hash ref are : =item desc - Label for this item From 1728a311054103e6c059ffed223ef177932b9f8d Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 20 Dec 2014 16:01:41 -0800 Subject: [PATCH 21/21] Show headers above sections --- gray-theme/right.cgi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gray-theme/right.cgi b/gray-theme/right.cgi index 569c54a04..7a00df599 100755 --- a/gray-theme/right.cgi +++ b/gray-theme/right.cgi @@ -59,6 +59,10 @@ foreach my $info (@info) { $open); if ($info->{'type'} eq 'table') { # A table of various labels and values + if ($info->{'header'}) { + print &ui_table_row( + undef, $info->{'header'}, 4); + } foreach my $t (@{$info->{'table'}}) { my $chart = ""; if ($t->{'chart'}) { @@ -72,7 +76,11 @@ foreach my $info (@info) { } elsif ($info->{'type'} eq 'chart') { # A table of graphs - my $ctable = &ui_columns_start($info->{'titles'}); + my $ctable; + if ($info->{'header'}) { + $ctable .= $info->{'header'}."
\n"; + } + $ctable .= &ui_columns_start($info->{'titles'}); foreach my $t (@{$info->{'chart'}}) { $ctable .= &ui_columns_row([ $t->{'desc'},