summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-17 16:54:34 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-17 16:54:34 +0000
commit96da6142e31059db951e8d9889bb25434aa57eaa (patch)
tree44e331918adbad9e9c928636cf09a95e2611ca3b
parentbade70f99d5ac092a548a85555b57775e8c0e3a5 (diff)
downloaddrakwizard-96da6142e31059db951e8d9889bb25434aa57eaa.tar
drakwizard-96da6142e31059db951e8d9889bb25434aa57eaa.tar.gz
drakwizard-96da6142e31059db951e8d9889bb25434aa57eaa.tar.bz2
drakwizard-96da6142e31059db951e8d9889bb25434aa57eaa.tar.xz
drakwizard-96da6142e31059db951e8d9889bb25434aa57eaa.zip
perl_checker cleanups
-rw-r--r--pxe_wizard/Pxe.pm30
1 files changed, 9 insertions, 21 deletions
diff --git a/pxe_wizard/Pxe.pm b/pxe_wizard/Pxe.pm
index 2921d351..fb12ac5d 100644
--- a/pxe_wizard/Pxe.pm
+++ b/pxe_wizard/Pxe.pm
@@ -75,9 +75,9 @@ my $o = {
needed_rpm => [ 'pxe', 'tftp-server', 'xinetd' ],
init => sub {
if (member($DOMAINNAME, qw(localdomain (none)))) {
- return 0, N("You need to readjust your domainname, not equal to localdomain or none. Please launch drakconnect to adjust it.")
+ return 0, N("You need to readjust your domainname, not equal to localdomain or none. Please launch drakconnect to adjust it.");
}
- 1
+ 1;
},
};
@@ -188,9 +188,7 @@ $o->{pages} = {
name => N("We need an all.rdz or a network.img image. Please add one."),
no_back => 1,
next => 'welcome',
- post => sub {
- $o->{var}{wiz_level} = 4
- },
+ post => sub { $o->{var}{wiz_level} = 4 },
},
error_imgrdz => {
name => N("Please provide an all.rdz image, which contains all drivers. You can find one on the first CD of the Mageia distribution, in the /isolinux/alt0/ directory."),
@@ -333,25 +331,15 @@ sub memlinux_prep {
# test img and similar entry in PXE
sub test_data {
$o->{var}{PXENAME} =~ /^\w+$/ or return 'error_name';
- if (!-f $o->{var}{IMG}) {
- return 'error_img'
- }
- if (any { /^$o->{var}{PXENAME}/ } cat_($PXEHELP)) {
- return 'simmilar_entry'
- }
+ return 'error_img' if !-f $o->{var}{IMG};
+ return 'simmilar_entry' if any { /^$o->{var}{PXENAME}/ } cat_($PXEHELP);
}
sub test_datardz {
$o->{var}{PXENAME} =~ /^\w+$/ or return 'error_name';
- if (!-f $o->{var}{ALLRDZ}) {
- return 'error_imgrdz'
- }
- if (!-f $o->{var}{VMLINUZ}) {
- return 'error_imgrdz'
- }
- if (any { /^$o->{var}{PXENAME}/ } cat_($PXEHELP)) {
- return 'simmilar_entryrdz'
- }
+ return 'error_imgrdz' if !-f $o->{var}{ALLRDZ};
+ return 'error_imgrdz' if !-f $o->{var}{VMLINUZ};
+ return 'simmilar_entryrdz' if any { /^$o->{var}{PXENAME}/ } cat_($PXEHELP);
}
# enable tftp server
@@ -448,7 +436,7 @@ sub remove_in_help {
sub remove_img {
my ($NAME) = @_;
if (-f "$IMGPATH/$NAME.img") {
- rm_rf($IMGPATH . "/" . $NAME . '.img')
+ rm_rf($IMGPATH . "/" . $NAME . '.img');
}
if (-f "$IMGPATH/vmlinuz-$NAME") {
rm_rf("$IMGPATH/vmlinuz-$NAME");