Changeset 23270 for ipk/source.sh4/titanskins_tobayer01/CONTROL
- Timestamp:
- Sep 5, 2013, 1:11:10 AM (13 years ago)
- Location:
- ipk/source.sh4/titanskins_tobayer01/CONTROL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanskins_tobayer01/CONTROL/postinst
r13990 r23270 1 1 #!/bin/sh 2 TMP=/tmp/.titanskin3 echo "successfully installed"4 2 5 echo "now you can choose the new skin...." 6 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then 7 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1` 8 FREE=`expr $SPACE - 100` 9 echo new freespace size $FREE kb 3 releaseversion=22775 4 plugin_short="tobayer01" 5 plugin_type="skin" 6 plugin_target="/var/usr/local/share/titan/skin" 7 8 plugin_dir="$plugin_target/$plugin_short" 9 plugin="$plugin_short $plugin_type" 10 11 imageversion=`cat /etc/version | cut -d "_" -f2 | sed 's/M//'`; 12 13 14 ### MAIN ### 15 16 sync 17 SPACE=`getfreespace $plugin_target` 18 FREE=`expr $SPACE - 100` 19 echo 20 echo "New free space: ${FREE}kB" 21 22 23 if [ "$imageversion" -gt "$releaseversion" ]; then 24 echo "Successfully installed $plugin (non-release version)." 25 # ==> rm skin_release.xml 26 rm $plugin_dir/skin_release.xml 10 27 else 11 echo "syncing disk" 12 sync 28 echo "Successfully installed $plugin (release version)." 29 # ==> mv skin_release.xml skin.xml" 30 mv $plugin_dir/skin_release.xml $plugin_dir/skin.xml 13 31 fi 14 32 -
ipk/source.sh4/titanskins_tobayer01/CONTROL/postrm
r12781 r23270 1 1 #!/bin/sh 2 TMP=/tmp/.skin3 2 4 PLUGINDIR=/var/usr/local/share/titan/skin/tobayer01 5 rm -r /var/usr/local/share/titan/skin/tobayer01 3 plugin_short="tobayer01" 4 plugin_type="skin" 5 plugin_target="/var/usr/local/share/titan/skin" 6 6 7 echo "successfully removed" 8 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then 9 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1` 10 FREE=`expr $SPACE - 100` 11 echo new freespace size $FREE kb 12 else 13 echo "syncing disk" 14 sync 15 fi 7 plugin_dir="$plugin_target/$plugin_short" 8 plugin="$plugin_short $plugin_type" 9 10 11 ### MAIN ### 12 13 rm -rf $plugin_dir 14 15 sync 16 SPACE=`getfreespace $plugin_target` 17 FREE=`expr $SPACE - 100` 18 echo "New free space: ${FREE}kB" 19 echo 20 echo "Successfully removed $plugin." 21 16 22 exit 0 -
ipk/source.sh4/titanskins_tobayer01/CONTROL/preinst
r18447 r23270 1 1 #!/bin/sh 2 #3 TMP=/tmp/.titanskin4 echo "syncing disk"5 sync6 2 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 "" 12 if [ "$model" = "" ]; then 13 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!" 3 plugin_size=2300 4 plugin_short="tobayer01" 5 plugin_type="skin" 6 plugin_target="/var/usr/local/share/titan/skin" 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!" 14 33 echo "Aborting installation..." 15 34 exit 1 16 35 else 17 echo "Boxtype: $model OK" 36 # echo "......[OK]" 37 echo 18 38 fi 19 39 20 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then 21 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1` 22 FREE=`expr $SPACE - 100` 23 SIZE=1050 24 echo "checking freespace" 25 echo package size $SIZE kb 26 echo freespace size $FREE kb 27 if [ "$FREE" -lt "$SIZE" ]; then 28 echo "sorry no freespace left on device" 29 exit 1 30 else 31 echo ok 32 fi 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..." 50 exit 1 33 51 else 34 echo "syncing disk"35 sync52 # echo "......[OK]" 53 echo 36 54 fi 37 55 38 buildgroup=`cat /etc/.buildgroup` 39 echo "checking OS" 40 if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then 41 echo --------------------------- 42 echo DONT USE this IPK Package!! 43 echo --- 44 echo Only for $buildgroup Image!! 45 echo --------------------------- 46 exit 1 47 fi 48 49 echo "installing tobayer01 skin ..." 56 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]" 50 75 51 76 exit 0 -
ipk/source.sh4/titanskins_tobayer01/CONTROL/prerm
r12781 r23270 1 1 #!/bin/sh 2 TMP=/tmp/.titanskin 3 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then 4 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1` 5 FREE=`expr $SPACE - 100` 6 echo new freespace size $FREE kb 7 else 8 echo "syncing disk" 9 sync 10 fi 11 echo "removing tobayer01 skin" 2 3 plugin_short="tobayer01" 4 plugin_type="skin" 5 plugin_target="/var/usr/local/share/titan/skin" 6 7 plugin_dir="$plugin_target/$plugin_short" 8 plugin="$plugin_short $plugin_type" 9 10 11 ### MAIN ### 12 13 sync 14 SPACE=`getfreespace $plugin_target` 15 FREE=`expr $SPACE - 100` 16 echo "Old free space: ${FREE}kB" 17 12 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)