Changeset 23247 for ipk/source.sh4/titanswapskins_tobayer01/CONTROL/prerm
- Timestamp:
- Sep 4, 2013, 12:34:44 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/prerm
r23203 r23247 1 1 #!/bin/sh 2 2 3 plugin="tobayer01 swapskin" 4 link=`readlink /var/swap` 3 plugin_short="tobayer01" 4 plugin_type="swapskin" 5 plugin_target="/var/swap/titanskins" 5 6 6 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then 7 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1` 8 FREE=`expr $SPACE - 100` 9 echo "Old free space: $FREE kb" 10 else 11 sync 12 fi 7 plugin_dir="$plugin_target/$plugin_short" 8 plugin="$plugin_short $plugin_type" 13 9 14 echo "Removing $plugin..." 10 11 ### FUNCTIONS ### 12 13 RES_COL=60 # column number to place the status message 14 MOVE_TO_COL="echo -en \\033[${RES_COL}G" # command to move to the configured column number 15 16 echo_success() { # function to print the SUCCESS status 17 $MOVE_TO_COL; echo -n "[ OK ]"; echo 18 } 19 20 echo_failure() { 21 $MOVE_TO_COL; echo -n "[FAILED]"; echo # function to print the FAILED status message 22 } 23 24 25 26 ### MAIN ### 27 28 sync 29 SPACE=`getfreespace $plugin_target` 30 FREE=`expr $SPACE - 100` 31 echo "Old free space: $FREE kB" 32 33 34 echo -n "Removing $plugin..." 35 echo_success 15 36 16 37 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)