source: ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postrm@ 23248

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

[titan] tobayer01 swapskin: change echo with escape to printf

File size: 649 bytes
Line 
1#!/bin/sh
2
3plugin_short="tobayer01"
4plugin_type="swapskin"
5plugin_target="/var/swap/titanskins"
6
7plugin_dir="$plugin_target/$plugin_short"
8plugin="$plugin_short $plugin_type"
9
10
11### FUNCTIONS ###
12
13RES_COL=60 # column number to place the status
14
15echo_success() { # function to print the OK status
16 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]"
17}
18
19echo_failure() { # function to print the FAILED status
20 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"
21}
22
23
24
25### MAIN ###
26
27rm -rf $plugin_dir
28
29sync
30SPACE=`getfreespace $plugin_target`
31FREE=`expr $SPACE - 100`
32echo
33echo "New free space: $FREE kB"
34
35echo "Successfully removed $plugin."
36
37exit 0
Note: See TracBrowser for help on using the repository browser.