From 571386775f006caa24ce2690fd99ef9440b48e32 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Wed, 6 Jul 2005 05:22:16 +0000 Subject: display wait message box while reloading/restarting nfs server --- perl-install/standalone/draknfs | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/perl-install/standalone/draknfs b/perl-install/standalone/draknfs index 71d1c6b9e..2e410931c 100644 --- a/perl-install/standalone/draknfs +++ b/perl-install/standalone/draknfs @@ -63,25 +63,18 @@ sub quit_all() { } sub restart_dialog { - wait_action("system nfs restart"); + wait_action("service nfs restart"); } sub reload_dialog { - wait_action("system nfs reload"); + wait_action("service nfs reload"); } sub wait_action { - my ($cmd) = @_; - my $w = $in->wait_message(N("NFS server"), N("Restarting/reloading your NFS server...")); - sleep(1); - system("$cmd"); - sleep(1); - my $err = $@; - undef $w; - if ($err) { - err_dialog(N("Error"), N("NFS server cant restart:") . "\n\n" . $err); - } - undef $w; + 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); @@ -130,7 +123,8 @@ sub write_conf { } } -my $help_access = N("NFS clients may be specified in a number of ways: +my $help_access; +$help_access = N("NFS clients may be specified in a number of ways: single host: a host either by an abbreviated name recognized be the resolver, fully qualified domain name, or an IP address @@ -142,7 +136,7 @@ my $help_access = N("NFS clients may be specified i wildcards: machine names may contain the wildcard characters * and ?. For instance: *.cs.foo.edu matches all hosts in the domain cs.foo.edu. -IP networks: 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. +IP networks: 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("User ID options -- cgit v1.2.1