Changeset 23270 for ipk/source.sh4/titanswapskins_tobayer01
- Timestamp:
- Sep 5, 2013, 1:11:10 AM (13 years ago)
- Location:
- ipk/source.sh4/titanswapskins_tobayer01/CONTROL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postinst
r23248 r23270 12 12 13 13 14 ### FUNCTIONS ###15 16 RES_COL=60 # column number to place the status17 18 echo_success() { # function to print the OK status19 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]"20 }21 22 echo_failure() { # function to print the FAILED status23 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"24 }25 26 27 28 14 ### MAIN ### 29 15 … … 32 18 FREE=`expr $SPACE - 100` 33 19 echo 34 echo "New free space: $ FREEkB"20 echo "New free space: ${FREE}kB" 35 21 36 22 -
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postrm
r23248 r23270 9 9 10 10 11 ### FUNCTIONS ###12 13 RES_COL=60 # column number to place the status14 15 echo_success() { # function to print the OK status16 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]"17 }18 19 echo_failure() { # function to print the FAILED status20 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"21 }22 23 24 25 11 ### MAIN ### 26 12 … … 30 16 SPACE=`getfreespace $plugin_target` 31 17 FREE=`expr $SPACE - 100` 18 echo "New free space: ${FREE}kB" 32 19 echo 33 echo "New free space: $FREE kB"34 35 20 echo "Successfully removed $plugin." 36 21 -
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/preinst
r23248 r23270 9 9 plugin="$plugin_short $plugin_type" 10 10 11 model=`cat /etc/model`12 buildgroup=`cat /etc/.buildgroup`13 14 15 ### FUNCTIONS ###16 17 RES_COL=60 # column number to place the status18 19 echo_success() { # function to print the OK status20 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]"21 }22 23 echo_failure() { # function to print the FAILED status24 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"25 }26 27 28 11 29 12 ### MAIN ### 30 13 31 msg="Checking box type..." 32 if [ "$model" = "" ]; then 33 echo_failure "$msg" 14 # Is this check for anything useful??? 15 #model=`cat /etc/model` 16 #echo -n "Checking box type..." 17 #if [ "$model" = "" ]; then 18 # echo "......[FAILED]" 19 # echo 20 # echo "Sorry, $plugin is not available for the $model!" 21 # echo "Aborting installation..." 22 # exit 1 23 #else 24 # echo "......[OK]" 25 #fi 26 27 28 echo -n "Checking installation directory..." 29 if [ ! -d $plugin_target ]; then 30 echo "......[FAILED]" 34 31 echo 35 echo " Sorry, $plugin is not available for the $model!"32 echo "'$plugin_target' not found!" 36 33 echo "Aborting installation..." 37 34 exit 1 38 35 else 39 echo_success "$msg" 40 fi 41 42 43 msg="Checking installation directory..." 44 if [ ! -d $plugin_target ]; then 45 echo_failure "$msg" 36 # echo "......[OK]" 46 37 echo 47 echo "Sorry, $plugin_target not found!"48 echo "Aborting installation..."49 exit 150 else51 echo_success "$msg"52 38 fi 53 39 … … 56 42 SPACE=`getfreespace $plugin_target` 57 43 FREE=`expr $SPACE - 100` 58 msg="Checking free space ($plugin_size in $FREEkB)..."44 echo -n "Checking free space (${plugin_size}/${FREE}kB)..." 59 45 if [ "$FREE" -lt "$plugin_size" ]; then 60 echo _failure "$msg"46 echo "......[FAILED]" 61 47 echo 62 echo " Sorry, not enough free space in $plugin_target!"48 echo "Not enough free space in $plugin_target!" 63 49 echo "Aborting installation..." 64 50 exit 1 65 51 else 66 echo_success "$msg" 52 # echo "......[OK]" 53 echo 67 54 fi 68 55 69 56 70 msg="Checking image type..." 71 if [ `cat /etc/version | grep $buildgroup | wc -l` -eq 0 ]; then 72 echo_failure "$msg" 73 echo 74 echo "Sorry, $plugin is not available for this image type!" 75 echo "Aborting installation..." 76 exit 1 77 else 78 echo_success "$msg" 79 fi 57 # Is this check for anything useful??? 58 #buildgroup=`cat /etc/.buildgroup` 59 #echo -n "Checking image type..." 60 #if [ `cat /etc/version | grep $buildgroup | wc -l` -eq 0 ]; then 61 # echo "......[FAILED]" 62 # echo 63 # echo "Sorry, $plugin is not available for this image type!" 64 # echo "Aborting installation..." 65 # exit 1 66 #else 67 # echo "......[OK]" 68 #fi 80 69 81 70 82 71 rm -rf $plugin_dir 83 72 84 msg="Installing $plugin..."85 echo_success "$msg"73 #echo -n "Installing $plugin..." 74 #echo "......[OK]" 86 75 87 76 exit 0 -
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/prerm
r23248 r23270 9 9 10 10 11 ### FUNCTIONS ###12 13 RES_COL=60 # column number to place the status14 15 echo_success() { # function to print the OK status16 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]"17 }18 19 echo_failure() { # function to print the FAILED status20 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"21 }22 23 24 25 11 ### MAIN ### 26 12 … … 28 14 SPACE=`getfreespace $plugin_target` 29 15 FREE=`expr $SPACE - 100` 30 echo "Old free space: $FREE kB" 31 32 33 msg="Removing $plugin..." 34 echo_success "$msg" 16 echo "Old free space: ${FREE}kB" 35 17 36 18 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/openaaf/chrome/common/titannit_trac_banner.png)