source: ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postinst@ 23203

Last change on this file since 23203 was 23203, checked in by tobayer, 13 years ago

[titan] tobayer01 swapskin: beautify control files

File size: 840 bytes
Line 
1#!/bin/sh
2
3releaseversion=22775
4plugin="tobayer01 swapskin"
5plugindir="/var/swap/titanskins/tobayer01"
6imageversion=`cat /etc/version | cut -d "_" -f2 | sed 's/M//'`;
7link=`readlink /var/swap`
8
9if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
10 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
11 FREE=`expr $SPACE - 100`
12 echo "New free space: $FREE kb"
13else
14 sync
15fi
16
17if [ "$imageversion" -gt "$releaseversion" ]; then
18 echo "Successfully installed $plugin (non-release version)."
19 # ==> rm skin_release.xml
20 rm $plugindir/skin_release.xml
21else
22 echo "Successfully installed $plugin (release version)."
23 # ==> mv skin_release.xml skin.xml"
24 mv $plugindir/skin_release.xml $plugindir/skin.xml
25fi
26
27exit 0
Note: See TracBrowser for help on using the repository browser.