source: ipk/source.sh4/titanswapskins_tobayer01/CONTROL/prerm@ 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: 634 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
27sync
28SPACE=`getfreespace $plugin_target`
29FREE=`expr $SPACE - 100`
30echo "Old free space: $FREE kB"
31
32
33msg="Removing $plugin..."
34echo_success "$msg"
35
36exit 0
Note: See TracBrowser for help on using the repository browser.