From 52e3b3cc7959cf016ea1f2a909a75e954ec6afb5 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 21 Jun 2005 10:21:15 +0000 Subject: factorize by using test_similar_label --- drakpxelinux.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drakpxelinux.pl') diff --git a/drakpxelinux.pl b/drakpxelinux.pl index e7178c4..094a8a6 100644 --- a/drakpxelinux.pl +++ b/drakpxelinux.pl @@ -207,9 +207,7 @@ sub wizard_add_entry { help => N("Provide the full path to vmlinuz kernel location") }, ], complete => sub { - if (any { /^$WPXENAME :/ } cat_($network::pxe::pxelinux_help_file)) { - err_dialog(N("Error!"), N("Found a similar entry in PXE list labeled: %s.\nChoose another label please", $WPXENAME)) and return 'addimg'; - } + test_similar_label($WPXENAME) or return 'addimg'; if (($WPXENAME) !~ /^\w+$/) { err_dialog(N("Error!"), N("PXE label should be an ASCII word/number without space. Please adjust")) and return 'addimg'; } -- cgit v1.2.1