- Timestamp:
- Sep 6, 2013, 2:39:18 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/preinst
r18470 r23281 1 1 #!/bin/sh 2 #3 TMP=/tmp/.titanskin4 2 5 model=`cat /etc/model` 6 echo"" 7 echo "Checking your Boxtype...." 8 echo "Some Plugins will not work correctly on your $model!" 9 echo "" 10 if [ "$model" = "" ]; then 11 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!" 3 plugin_size=1900 4 plugin_short="0Acht5Zehn" 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 11 12 ### MAIN ### 13 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]" 31 echo 32 echo "'$plugin_target' not found!" 12 33 echo "Aborting installation..." 13 34 exit 1 14 35 else 15 echo "Boxtype: $model OK" 36 # echo "......[OK]" 37 echo 16 38 fi 17 39 18 echo "checking swapstick" 19 if [ ! -d /var/swap/titanskins/ ]; then 20 echo "--------------------------" 21 echo "no swapstick found...." 22 echo "--------------------------" 40 41 sync 42 SPACE=`getfreespace $plugin_target` 43 FREE=`expr $SPACE - 100` 44 echo -n "Checking free space (${plugin_size}/${FREE}kB)..." 45 if [ "$FREE" -lt "$plugin_size" ]; then 46 echo "......[FAILED]" 47 echo 48 echo "Not enough free space in $plugin_target!" 49 echo "Aborting installation..." 23 50 exit 1 24 fi25 echo "swapstick found...."26 link=`readlink /var/swap`27 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then28 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`29 FREE=`expr $SPACE - 100`30 SIZE=190031 echo "checking freespace"32 echo packege size $SIZE kb33 echo freespace size $FREE kb34 if [ "$FREE" -lt "$SIZE" ]; then35 echo "sorry no freespace left on device"36 exit 137 else38 echo ok39 fi40 51 else 41 echo "syncing disk" 42 sync 43 fi 44 buildgroup=`cat /etc/.buildgroup` 45 echo "checking OS" 46 if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then 47 echo --------------------------- 48 echo DONT USE this IPK Package!! 49 echo --- 50 echo Only for $buildgroup Image!! 51 echo --------------------------- 52 exit 1 52 # echo "......[OK]" 53 echo 53 54 fi 54 55 55 rm -rf /var/swap/titanskins/0Acht5Zehn56 56 57 echo "installing Swap 0Acht5Zehn grey Skin ..." 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 69 70 71 rm -rf $plugin_dir 72 73 #echo -n "Installing $plugin..." 74 #echo "......[OK]" 58 75 59 76 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)