Changeset 23201 for ipk/source.sh4/titanswapskins_tobayer01/CONTROL/preinst
- Timestamp:
- Sep 2, 2013, 12:02:32 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/preinst
r15994 r23201 1 1 #!/bin/sh 2 # 3 TMP=/tmp/.titanskin 4 echo "syncing disk" 2 3 plugin="tobayer01 swapskin" 4 plugindir="/var/swap/titanskins/tobayer01" 5 pluginsize=2300 6 model=`cat /etc/model` 7 link=`readlink /var/swap` 8 buildgroup=`cat /etc/.buildgroup` 9 10 #echo "syncing disk" 5 11 sync 12 #echo"" 6 13 7 model=`cat /etc/model` 8 echo"" 9 echo "Checking your Boxtype...." 10 echo "Some Plugins will not work correctly on your $model!" 11 echo "" 14 echo "Checking your box type..." 12 15 if [ "$model" = "" ]; then 13 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!" 16 echo "" 17 echo "Sorry! This plugin is not available for your $model, because it will not work correctly!" 14 18 echo "Aborting installation..." 15 19 exit 1 16 20 else 17 echo "Box type: $model OK"21 echo "Box type $model OK." 18 22 fi 19 23 20 echo " checking swapstick"24 echo "Checking swapstick..." 21 25 if [ ! -d /var/swap/titanskins/ ]; then 22 echo "--------------------------"23 echo " no swapstick found...."24 echo "---------------------- ----"26 echo "----------------------" 27 echo "Swapstick not found..." 28 echo "----------------------" 25 29 exit 1 30 else 31 echo "Swapstick found..." 26 32 fi 27 echo "swapstick found...." 28 link=`readlink /var/swap` 33 29 34 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then 30 35 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1` 31 36 FREE=`expr $SPACE - 100` 32 SIZE=1050 33 echo "checking freespace" 34 echo package size $SIZE kb 35 echo freespace size $FREE kb 36 if [ "$FREE" -lt "$SIZE" ]; then 37 echo "sorry no freespace left on device" 37 echo "Checking free space..." 38 echo "Package size $pluginsize kb" 39 echo "Free space $FREE kb" 40 if [ "$FREE" -lt "$pluginsize" ]; then 41 echo "Sorry, not enough free space on your device!" 38 42 exit 1 39 43 else 40 echo ok44 echo "OK" 41 45 fi 42 46 else 43 echo "syncing disk"47 #echo "Syncing disk..." 44 48 sync 45 49 fi 46 50 47 buildgroup=`cat /etc/.buildgroup` 48 echo "checking OS" 49 if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then 50 echo --------------------------- 51 echo DONT USE this IPK Package!! 52 echo --- 53 echo Only for $buildgroup Image!! 54 echo --------------------------- 55 exit 1 51 echo "Checking OS..." 52 if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then 53 echo "---------------------------" 54 echo "Don't use this TPK package!" 55 echo "---" 56 echo "Only for $buildgroup image!" 57 echo "---------------------------" 58 exit 1 56 59 fi 57 60 58 rm -rf /var/swap/titanskins/tobayer01 59 60 echo "installing tobayer01 skin to swapstick..." 61 rm -rf $plugindir 62 echo "Installing $plugin..." 61 63 62 64 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)