-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathsdm-customphase
executable file
·54 lines (48 loc) · 1.26 KB
/
sdm-customphase
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
#!/bin/bash
#
# Sample sdm Custom Phase script
#
function loadparams() {
source $SDMPT/etc/sdm/sdm-readparams
}
# $1 is the phase: "0", "1", or "post-install"
#
# Main code for the script
#
phase=$1
pfx="$(basename $0)" #For messages
loadparams
if [ $phase == "0" ]
then
#
# In Phase 0 all references to directories in the image must be preceded by $SDMPT
#
logtoboth "* $pfx Phase 0"
# INSERT Your Custom Phase 0 code here
logtoboth "* $pfx Phase 0 Completed"
elif [ "$phase" == "1" ]
then
#
# Phase 1 (in nspawn)
#
logtoboth "* $pfx Phase 1"
logfreespace "at start of $pfx Phase 1"
#
# INSERT your Custom Phase 1 customization stuff here
# In Phase 1 all references to directories in the image can be direct
#
logfreespace "at end of $pfx Phase 1"
logtoboth "* $pfx Phase 1 Completed"
else
#
# Post-install edits
#
logtoboth "* $pfx Custom Phase post-install"
logfreespace "at start of $pfx Custom Phase post-install"
#
# INSERT Your Custom Phase post-install code here
# In Phase post-install all references to directories in the image can be direct
#
logfreespace "at end of $pfx Custom Phase post-install"
logtoboth "* $pfx Custom Phase post-install Completed"
fi