summaryrefslogtreecommitdiffstats
path: root/nfs_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'nfs_wizard')
-rwxr-xr-xnfs_wizard/NFS.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/nfs_wizard/NFS.pm b/nfs_wizard/NFS.pm
index 6b47941e..a27f32fa 100755
--- a/nfs_wizard/NFS.pm
+++ b/nfs_wizard/NFS.pm
@@ -119,8 +119,8 @@ sub check {
sub network_mask {
my $wiz_ip_server = $wiz->{net}->itf_get("IPADDR");
my $mask = $wiz->{net}->itf_get("NETMASK");
- $mask = $mask ? $mask : "255.255.255.0";
- $wiz_ip_server = $wiz_ip_server ? $wiz_ip_server : "192.168.1.0";
+ $mask = $mask || "255.255.255.0";
+ $wiz_ip_server = $wiz_ip_server || "192.168.1.0";
"$1.$2.$3.0/$mask" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
}
@@ -143,12 +143,12 @@ sub do_it {
}
my $t;
foreach (cat_($file)) {
- if (/^(?!\#).*$o->{var}{wiz_nfs_dir}\s.*/) {
+ if (/^(?!#).*$o->{var}{wiz_nfs_dir}\s/) {
$t = $_;
last;
}
}
- substInFile { s|^(?!\#).*$o->{var}{wiz_nfs_dir}\s.*|\#$&|} $file;
+ substInFile { s|^(?!#).*$o->{var}{wiz_nfs_dir}\s.*|#$&| } $file;
append_to_file($file, $line);
system("/usr/sbin/exportfs -a");
services::start('nfs') if services::is_service_running('nfs')