-
Notifications
You must be signed in to change notification settings - Fork 26
/
repit-fs-raw.sh
67 lines (52 loc) · 1.5 KB
/
repit-fs-raw.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#####################################################
# Lanchon REPIT - File System Handler #
# Copyright 2016, Lanchon #
#####################################################
#####################################################
# Lanchon REPIT is free software licensed under #
# the GNU General Public License (GPL) version 3 #
# and any later version. #
#####################################################
### raw
checkTools_fs_raw() {
# only require tools if actually needed
:
}
processPar_raw_wipe_dry() {
local n=$1
local dev=$2
local oldStart=$3
local oldSize=$4
local newStart=$5
local newSize=$6
fatal "cannot wipe raw partitions"
}
processPar_raw_keep_dry() {
local n=$1
local dev=$2
local oldStart=$3
local oldSize=$4
local newStart=$5
local newSize=$6
if [ $(( newSize != oldSize )) -ne 0 ]; then
fatal "cannot resize raw partitions"
fi
if [ $(( newStart != oldStart )) -ne 0 ]; then
info "will move the raw partition"
fi
}
processPar_raw_keep_wet() {
local n=$1
local dev=$2
local oldStart=$3
local oldSize=$4
local newStart=$5
local newSize=$6
if [ $(( newSize != oldSize )) -ne 0 ]; then
fatal "assertion failed: cannot resize raw partitions"
fi
if [ $(( newStart != oldStart )) -ne 0 ]; then
info "moving the raw partition"
processParMove $n $oldStart $newStart $oldSize
fi
}