[lastbash-cvs] lastbash lastbash,1.108,1.109
Status: Beta
Brought to you by:
cstroie
|
From: Costin S. <cs...@us...> - 2006-12-27 15:03:07
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv8666 Modified Files: lastbash Log Message: More checks and notifications. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- lastbash 21 Dec 2006 14:55:33 -0000 1.108 +++ lastbash 27 Dec 2006 15:03:00 -0000 1.109 @@ -180,9 +180,13 @@ if [ "${BASH_VERSINFO[0]}" -lt "3" ] then echo "Bash version 3 is needed." + debug "${FUNCNAME}: Unsupported Bash version: $BASH_VERSION" exit 1 fi + # Note the bash version and the machine type + debug "${FUNCNAME}: Using Bash $BASH_VERSION on $MACHTYPE" + # Check some required programs debug "${FUNCNAME}: Checking for missing programs..." for P in ${REQ_PROGRAMS} @@ -293,6 +297,9 @@ HTTP_CLIENT="builtin" fi fi + + # INIT done + debug "${FUNCNAME}: Init done" } # Function: Quit {{{1 @@ -578,7 +585,11 @@ done # Check the returned data - if [[ "${LASTFM_SESSION}" =~ "failed" ]] + if [ ! "${LASTFM_SESSION}" ] + then + RET="4" + debug "${FUNCNAME}: No session retrieved" + elif [[ "${LASTFM_SESSION}" =~ "failed" ]] then RET="2" debug "${FUNCNAME}: Session failed" |