Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f45347ce authored by Romain Hunault's avatar Romain Hunault
Browse files

blue-red-green order

parent 7a73d283
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -37,19 +37,23 @@ fi
while [ -z ${CABLE} ]
do

  if [ ! -f ${CABLES_LOCKED_FOLDER}/blue.lock ]
  sleep 1

  if [ -f ${CABLES_LOCKED_FOLDER}/blue.lock ] && [ -f ${CABLES_LOCKED_FOLDER}/red.lock ] && [ -f ${CABLES_LOCKED_FOLDER}/green.lock ]
  then
    continue
  fi

  CABLE=blue
  elif [ ! -f ${CABLES_LOCKED_FOLDER}/red.lock ]
  then
    CABLE=red
  elif [ ! -f ${CABLES_LOCKED_FOLDER}/green.lock ]
  
  if [ -f ${CABLES_LOCKED_FOLDER}/red.lock ] && [ ! -f ${CABLES_LOCKED_FOLDER}/green.lock ] 
  then
    CABLE=green
  elif [ -f ${CABLES_LOCKED_FOLDER}/blue.lock ] && [ ! -f ${CABLES_LOCKED_FOLDER}/red.lock ] 
  then
    CABLE=red
  fi

  sleep 1

done

echo ${CABLE}