Skip to content

Commit 05ba6ba

Browse files
committed
Add apt-options confold, confdef
1 parent 4cc077c commit 05ba6ba

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

sdm-phase1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,22 @@ then
156156
sed -i "s/CONF_SWAPSIZE=.*/CONF_SWAPSIZE=$swapsize/" /etc/dphys-swapfile
157157
fi
158158

159+
#
160+
# Configure confold and confdef if requested
161+
#
162+
rm -f /etc/apt/apt.conf.d/10-sdm-force
163+
if [[ "$poptions" =~ confold ]]
164+
then
165+
logtoboth "> Enable apt force-confold per --apt-options confold"
166+
echo 'Dpkg::Options "--force-confold";' >> /etc/apt/apt.conf.d/10-sdm-force
167+
fi
168+
169+
if [[ "$poptions" =~ confdef ]]
170+
then
171+
logtoboth "> Enable apt force-confdef per --apt-options confdef"
172+
echo 'Dpkg::Options "--force-confdef";' >> /etc/apt/apt.conf.d/10-sdm-force
173+
fi
174+
159175
if ! [[ "$poptions" =~ "noupdate" ]]
160176
then
161177
logtoboth "> Start 'apt update'"

0 commit comments

Comments
 (0)