From 9e1b1f92fd64c8a148d523a0bdeb675b596b4d33 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 18 Oct 2012 20:50:43 +0000 Subject: (do_it) simplify --- ftp_wizard/Proftpd.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'ftp_wizard') diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm index d322aace..24f867ae 100755 --- a/ftp_wizard/Proftpd.pm +++ b/ftp_wizard/Proftpd.pm @@ -306,12 +306,7 @@ sub do_it { substInFile { s/^ServerName.*/ServerName $o->{var}{wiz_server_name}/ } $file; substInFile { s/^Port.*/Port $o->{var}{wiz_port}/ } $file; - my $data; - if ($o->{var}{wiz_default_root} == 1) { - $data = "DefaultRoot ~"; - } else { - $data = ""; - } + my $data = $o->{var}{wiz_default_root} == 1 ? "DefaultRoot ~" : ''; if (any { /^DefaultRoot/ } cat_($file)) { substInFile { s/DefaultRoot.*/$data/ } $file; } else { -- cgit v1.2.1