Advertisement
ciusss89

FLYMODE.sh

Jul 18th, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.19 KB | None | 0 0
  1. #!/bin/bash
  2. # TIPALDI GIUSEPPE 2-2013
  3. # IMPORTANTE
  4. # Utilizzo  FLYMODE.sh A B
  5. # Se A=[0,1] 1 Attiva modalita di scansione automatica, 0 disattiva.
  6. # In B specificare il tempo.
  7.  
  8. FLAG=$1;
  9. TIME=$2;
  10.  
  11.  
  12. case "$1" in
  13.   0)
  14.         echo  "Automatic scanning mode DISABLE."
  15.         echo "# NOT EDIT THIS FILE. IT AUTOGENERATED FROM FLYMODE.sh" > /mnt/NAND/01_site/sys_state/FLYMODE
  16.         echo "echo BIT: $FLAG" >> /mnt/NAND/01_site/sys_state/FLYMODE
  17.         echo "echo TIME: $TIME" >> /mnt/NAND/01_site/sys_state/FLYMODE
  18.         chmod a+x /mnt/NAND/01_site/sys_state/FLYMODE
  19.     ;;
  20.   1)
  21.         echo  "Automatic scanning mode ACTIVED, acquire time [$2]"
  22.         echo "# NOT EDIT THIS FILE. IT AUTOGENERATED FROM FLYMODE.sh" > /mnt/NAND/01_site/sys_state/FLYMODE
  23.         echo "echo BIT: $FLAG" >> /mnt/NAND/01_site/sys_state/FLYMODE
  24.         echo "echo TIME: $TIME" >> /mnt/NAND/01_site/sys_state/FLYMODE
  25.         chmod a+x /mnt/NAND/01_site/sys_state/FLYMODE
  26.     ;;
  27.   *)
  28.         echo "* HELP:"
  29.         echo "* 0: Disable autmatic scanning mode"
  30.         echo "* 1: Enable autmatic scanning mode"
  31.         echo "* TIME is time.."
  32.         echo "*Usage: FLYMODE.sh 0/1 TIME"
  33.     exit 1
  34.     ;;
  35. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement