source:
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/preinst@
23450
| Last change on this file since 23450 was 23280, checked in by , 13 years ago | |
|---|---|
| File size: 1.4 KB | |
| Rev | Line | |
|---|---|---|
| [10686] | 1 | #!/bin/sh |
| [23201] | 2 | |
| [23280] | 3 | plugin_size=1700 |
| [23247] | 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 | ||
| [23201] | 11 | |
| [23247] | 12 | ### MAIN ### |
| 13 | ||
| [23270] | 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 | |
| [10686] | 26 | |
| [23247] | 27 | |
| [23270] | 28 | echo -n "Checking installation directory..." |
| [23247] | 29 | if [ ! -d $plugin_target ]; then |
| [23270] | 30 | echo "......[FAILED]" |
| [23247] | 31 | echo |
| [23270] | 32 | echo "'$plugin_target' not found!" |
| [23247] | 33 | echo "Aborting installation..." |
| [10686] | 34 | exit 1 |
| [23201] | 35 | else |
| [23270] | 36 | # echo "......[OK]" |
| 37 | echo | |
| [10686] | 38 | fi |
| [23201] | 39 | |
| [23247] | 40 | |
| 41 | sync | |
| 42 | SPACE=`getfreespace $plugin_target` | |
| 43 | FREE=`expr $SPACE - 100` | |
| [23270] | 44 | echo -n "Checking free space (${plugin_size}/${FREE}kB)..." |
| [23247] | 45 | if [ "$FREE" -lt "$plugin_size" ]; then |
| [23270] | 46 | echo "......[FAILED]" |
| [23247] | 47 | echo |
| [23270] | 48 | echo "Not enough free space in $plugin_target!" |
| [23247] | 49 | echo "Aborting installation..." |
| 50 | exit 1 | |
| [12781] | 51 | else |
| [23270] | 52 | # echo "......[OK]" |
| 53 | echo | |
| [12781] | 54 | fi |
| [13990] | 55 | |
| [23247] | 56 | |
| [23270] | 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 | |
| [11782] | 69 | |
| [15994] | 70 | |
| [23247] | 71 | rm -rf $plugin_dir |
| 72 | ||
| [23270] | 73 | #echo -n "Installing $plugin..." |
| 74 | #echo "......[OK]" | |
| [23247] | 75 | |
| [23201] | 76 | exit 0 |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/openaaf/chrome/common/titannit_trac_banner.png)