File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,15 @@ if [ "$DOUPDATE" -eq 1 ]
122
122
then
123
123
# do update
124
124
# merge first
125
- merge_overlay && \
126
- # backup_boot
125
+ echo " merging..." && \
126
+ merge_overlay $OVERMPOINT / && \
127
+ echo " merge done" && \
128
+ echo " backing up boot..." && \
127
129
backup_boot && \
128
- # create new overlay
130
+ echo " backup boot done" && \
131
+ echo " recreating overlay..." && \
129
132
/sbin/create_overlay && \
133
+ echo " recreated overlay" && \
130
134
mountall
131
135
fi
132
136
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ CONF=${CONF:-/etc/coderbot/init_overlay.conf}
19
19
source $CONF # || fail "ERROR: file not found CONF_FILE: $CONF"
20
20
21
21
OVERMPOINT=${OVERMPOINT:- $1 }
22
- ROMMPOINT=${ROMMPOINT :- $2 }
22
+ ROMMPOINT=/
23
23
REOPTS=" rw,remount,rw"
24
24
UPPERDIR=${UPPERDIR:- upper}
25
25
26
- [ -d $OVERMPOINT ] || fail " ERROR: OVERMPOINT $OVERMPOINT directory not faound "
27
- [ -d $ROMMPOINT ] || fail " ERROR: ROMMPOINT $ROMMPOINT directory not faound "
26
+ [ -d $OVERMPOINT ] || fail " ERROR: OVERMPOINT $OVERMPOINT directory not found "
27
+ [ -d $ROMMPOINT ] || fail " ERROR: ROMMPOINT $ROMMPOINT directory not found "
28
28
29
29
mount -o $REOPTS $ROMMPOINT || fail " ERROR: can't remount $ROMMPOINT rw"
30
30
@@ -35,6 +35,7 @@ OPAQUE=`getfattr -dm- -R . | perl -le '$lastfile=""; while(<>){if($_ =~ m/^#.*fi
35
35
# back to previous dir
36
36
cd - || fail " ERROR: can't cd to previous dir (-)"
37
37
38
+ echo " Removing deleted files"
38
39
if [ -z " $REMOVED " ]
39
40
then
40
41
echo " Nothing to remove"
46
47
done <<< $REMOVED
47
48
fi
48
49
50
+ echo " Removing opaque files"
49
51
if [ -z " $OPAQUE " ]
50
52
then
51
53
echo " No opaque to remove"
56
58
done <<< $OPAQUE
57
59
fi
58
60
61
+ echo " Copying files from overlay to lower fs"
62
+
59
63
cp -a " ${OVERMPOINT} /${UPPERDIR} /." $ROMMPOINT / || fail " ERROR in copying files"
60
64
61
65
echo " Merged ok, now you should clear overlay and backup boot"
You can’t perform that action at this time.
0 commit comments