From b06e17c233094cddf6d643a1f973841c902d7b57 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 11 Apr 2008 17:35:26 +0000 Subject: [PATCH] Make Curses perl module optional git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1022 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/netboot/add-on/torque/pbstop | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/share/xcat/netboot/add-on/torque/pbstop b/xCAT-server-2.0/share/xcat/netboot/add-on/torque/pbstop index 28046f077..907aa53f4 100755 --- a/xCAT-server-2.0/share/xcat/netboot/add-on/torque/pbstop +++ b/xCAT-server-2.0/share/xcat/netboot/add-on/torque/pbstop @@ -53,6 +53,15 @@ my $pbsnodes = "/usr/local/pbs/bin/pbsnodes"; # we _are_ running it out of the source tree, assume we are just # testing it and enable warnings! BEGIN { + my $hascurses = eval { + require Curses; + }; + unless ($hascurses) { + print "perl Curses required for pbstop\n"; + exit 1; + } + import Curses; + use vars qw/$use_perlPBS/; use ExtUtils::testlib; @@ -71,7 +80,6 @@ if ( -d $INC[0] ) { use strict; use vars qw/$VERSION/; -use Curses; $VERSION = "4.05";