Changeset 7253 for ipk


Ignore:
Timestamp:
Apr 20, 2011, 10:22:31 PM (15 years ago)
Author:
obi
Message:

[ipk add neutrino swap picons

Location:
ipk/source
Files:
1126 added
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source/picons_neutrino/CONTROL/preinst

    r7250 r7253  
    1818fi
    1919
    20 if [ -e /etc/.fullusb ] || [ -e /etc/.usbimage ]; then
     20if [ -e /etc/.usbimage ]; then
    2121        echo "detected USB Image...."
    2222        echo "ok..."
    23 elif [ "$model" = "ufs912" ] || [ "$model" = "at7000" ] || [ "$model" = "at700" ]; then
     23elif [ "$model" = "ufs912" ] || [ "$model" = "at7500" ] || [ "$model" = "at7000" ] || [ "$model" = "at700" ]; then
    2424        echo "detected Boxtype : $model...."
    2525        echo "ok..."
    26         if [ `ls -la /var/usr/local/share/neutrino/icons | grep "/var/swap/picon.neutrino" | wc -l` -ge 1 ]; then
    27                 echo "check ok...installing to swap...."
    28         else
    29                 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
    30                         SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
    31                         FREE=`expr $SPACE - 100`
    32                         SIZE=4272
    33                         echo "checking freespace in flash"
    34                         echo packege size $SIZE kb
    35                         echo freespace size $FREE kb
    36                         if  [ "$FREE" -lt "$SIZE" ]; then
    37                                 echo "sorry no freespace left on device"
    38                                 echo "ERROR: this package will not fit in your flash..."
    39                                 echo "...you need a swapstick to install the package on your $model...!"
    40                                 echo "aborting installation..."
    41                                 exit 1
    42                         else
    43                                 echo freespace ok
    44                         fi
    45                 fi
     26        if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
     27                SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
     28                FREE=`expr $SPACE - 100`
     29                SIZE=4272
     30                echo "checking freespace in flash"
     31                echo packege size $SIZE kb
     32                echo freespace size $FREE kb
     33                if  [ "$FREE" -lt "$SIZE" ]; then
     34                        echo "sorry no freespace left on device"
     35                        echo "ERROR: this package will not fit in your flash..."
     36                        echo "...you need a swapstick to install the package on your $model...!"
     37                        echo "aborting installation..."
     38                        exit 1
     39                else
     40                        echo freespace ok
    4641        fi
    4742else
    48         if [ `ls -la /var/usr/local/share/neutrino/icons | grep "/var/swap/picon.neutrino" | wc -l` -ge 1 ]; then
    49                 echo "check ok...installing to swapstick...."
    50         else
    51                 echo "ERROR: this package will not fit in your flash..."
    52                 echo "...you need a swapstick to install the package on your $model...!"
    53                 echo "aborting installation..."
    54                 exit 1
    55         fi
     43        echo "ERROR: this package will not fit in your flash..."
     44        echo "...you need a swapstick to install the package on your $model...!"
     45        echo "aborting installation..."
     46        exit 1
    5647fi
    5748
     
    6657        exit 1
    6758fi
     59
     60rm -rf /var/usr/local/share/neutrino/icons/logo
     61                               
    6862exit 0
Note: See TracChangeset for help on using the changeset viewer.