~ubuntu-branches/ubuntu/trusty/uck/trusty

« back to all changes in this revision

Viewing changes to uck-remaster-umount

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-11-29 16:27:29 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101129162729-mvttwldbpezfojex
Tags: 2.4.0-0ubuntu1
* New upstream release.
* Depends on gfxboot (<< 4.2.2) | gfxboot-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
###################################################################################
 
4
# UCK - Ubuntu Customization Kit                                                  #
 
5
# Copyright (C) 2006-2010 UCK Team                                                #
 
6
#                                                                                 #
 
7
# UCK is free software: you can redistribute it and/or modify                     #
 
8
# it under the terms of the GNU General Public License as published by            #
 
9
# the Free Software Foundation, either version 3 of the License, or               #
 
10
# (at your option) any later version.                                             #
 
11
#                                                                                 #
 
12
# UCK is distributed in the hope that it will be useful,                          #
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of                  #
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                   #
 
15
# GNU General Public License for more details.                                    #
 
16
#                                                                                 #
 
17
# You should have received a copy of the GNU General Public License               #
 
18
# along with UCK.  If not, see <http://www.gnu.org/licenses/>.                    #
 
19
###################################################################################
 
20
 
 
21
REMASTER_HOME="$1"
 
22
 
 
23
#############################
 
24
# general purpose functions #
 
25
#############################
 
26
 
 
27
function usage()
 
28
{
 
29
        echo "Usage: $0 [remaster-dir]"
 
30
}
 
31
 
 
32
function failure()
 
33
{
 
34
        echo "$@"
 
35
        exit 1
 
36
}
 
37
 
 
38
#########################
 
39
# input parameter check #
 
40
#########################
 
41
 
 
42
if [ -z "$REMASTER_HOME" ]; then
 
43
        REMASTER_HOME=~/tmp
 
44
fi
 
45
 
 
46
########
 
47
# main #
 
48
########
 
49
 
 
50
. libraries/remaster-live-cd.sh 2>/dev/null ||
 
51
        . /usr/lib/uck/remaster-live-cd.sh 2>/dev/null ||
 
52
        failure "libraries not found"
 
53
 
 
54
# Check arguments
 
55
case "$REMASTER_HOME" in
 
56
/*)     : ok - has absolute path;;
 
57
*)      failure "remaster-dir argument must be absolute path";;
 
58
esac
 
59
 
 
60
# Umount r/w copy of rootfs on iso
 
61
if mountpoint "$REMASTER_HOME/remaster-root"; then
 
62
        union_umount "$REMASTER_HOME/remaster-root" ||
 
63
                failure "Can't union_umount $REMASTER_HOME/remaster-root"
 
64
fi
 
65
 
 
66
# Umount r/w copy of iso
 
67
if mountpoint "$REMASTER_HOME/remaster-iso"; then
 
68
        union_umount "$REMASTER_HOME/remaster-iso" ||
 
69
                failure "Can't union_umount $REMASTER_HOME/remaster-iso"
 
70
fi