perhaps we can simplify the logic a bit how about the following  no nested conditionals  breaks  or redundant log messages  while  rc timeout kmaxsleep sleep  then increase timeout check if server is responding  log info running wget to start rc system log info done running wget  rc rc if  rc log error unable to start devserver started  false 