- Timestamp:
- Sep 4, 2013, 12:34:44 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postinst
r23203 r23247 2 2 3 3 releaseversion=22775 4 plugin="tobayer01 swapskin" 5 plugindir="/var/swap/titanskins/tobayer01" 4 plugin_short="tobayer01" 5 plugin_type="swapskin" 6 plugin_target="/var/swap/titanskins" 7 8 plugin_dir="$plugin_target/$plugin_short" 9 plugin="$plugin_short $plugin_type" 10 6 11 imageversion=`cat /etc/version | cut -d "_" -f2 | sed 's/M//'`; 7 link=`readlink /var/swap`8 12 9 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then 10 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1` 11 FREE=`expr $SPACE - 100` 12 echo "New free space: $FREE kb" 13 else 14 sync 15 fi 13 14 ### FUNCTIONS ### 15 16 RES_COL=60 # column number to place the status message 17 MOVE_TO_COL="echo -en \\033[${RES_COL}G" # command to move to the configured column number 18 19 echo_success() { # function to print the SUCCESS status 20 $MOVE_TO_COL; echo -n "[ OK ]"; echo 21 } 22 23 echo_failure() { 24 $MOVE_TO_COL; echo -n "[FAILED]"; echo # function to print the FAILED status message 25 } 26 27 28 29 ### MAIN ### 30 31 sync 32 SPACE=`getfreespace $plugin_target` 33 FREE=`expr $SPACE - 100` 34 echo 35 echo "New free space: $FREE kB" 36 16 37 17 38 if [ "$imageversion" -gt "$releaseversion" ]; then 18 39 echo "Successfully installed $plugin (non-release version)." 19 40 # ==> rm skin_release.xml 20 rm $plugin dir/skin_release.xml41 rm $plugin_dir/skin_release.xml 21 42 else 22 43 echo "Successfully installed $plugin (release version)." 23 44 # ==> mv skin_release.xml skin.xml" 24 mv $plugin dir/skin_release.xml $plugindir/skin.xml45 mv $plugin_dir/skin_release.xml $plugin_dir/skin.xml 25 46 fi 26 47
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)