source: lliurex-up/trunk/fuentes/scripts/common/cleaning-environment @ 2609

Last change on this file since 2609 was 2609, checked in by kbut, 4 years ago

refactoring

File size: 785 bytes
Line 
1#!/bin/sh
2# Cleaning envirnment
3
4# gettext domain
5TEXTDOMAIN="lliurex-up"
6export TEXTDOMAIN
7
8COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh"
9if [  -r $COMMON_LIBRARY  ] ; then 
10        . $COMMON_LIBRARY
11fi
12
13#gettext messages
14INFO_MESSAGE="$(gettext "Cleaning system")"
15
16# Methods
17_info()
18{
19        echo "$INFO_MESSAGE"
20}
21
22_migrate()
23{
24        echo " * [ LliureX Up ] : Cleaning area "
25        rm -rf "/tmp/lliurex-up-working-area.*" || true
26        rm -f "/tmp/lliurex-up-check.log" || true
27       
28        if type update-initramfs >/dev/null 2>&1; then
29            update-initramfs -u || true
30        fi
31
32
33}
34
35_die()
36{
37        echo " * [ LliureX Up ] : Error: $1"
38        exit 1
39}
40
41_usage()
42{
43        echo " * [ LliureX Up ] : # Unknown argument"
44}
45
46ACTION="$1"
47case "$ACTION" in
48        migrate)
49                _migrate
50        ;;
51        info)
52                _info
53        ;;
54        *)
55                _usage
56        ;;
57esac
58
59exit 0
Note: See TracBrowser for help on using the repository browser.