ACCC1380 commited on
Commit
d131d35
1 Parent(s): 023cd25

Upload var/lib/dpkg/info/libc6:amd64.preinst with huggingface_hub

Browse files
Files changed (1) hide show
  1. var/lib/dpkg/info/libc6:amd64.preinst +520 -0
var/lib/dpkg/info/libc6:amd64.preinst ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ set -e
3
+ export LC_ALL=C
4
+
5
+ type=$1
6
+ preversion=$2
7
+
8
+ linux_compare_versions () {
9
+ verA=$(($(echo "$1" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
10
+ verB=$(($(echo "$3" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
11
+
12
+ test $verA -$2 $verB
13
+ }
14
+
15
+ kfreebsd_compare_versions () {
16
+ verA=$(($(echo "$1" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/')))
17
+ verB=$(($(echo "$3" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/')))
18
+
19
+ test $verA -$2 $verB
20
+ }
21
+
22
+ # Sanity check.
23
+ # If there are versions of glibc outside of the normal installation
24
+ # location (/lib, /lib64, etc.) then things may break very badly
25
+ # as soon as ld.so is replaced by a new version. This check is not
26
+ # foolproof, but it's pretty accurate. This script ignores libraries
27
+ # with different sonames, and libraries incompatible with the
28
+ # to-be-installed ld.so.
29
+ check_dir () {
30
+ msg=$1
31
+ dir=$2
32
+
33
+ # Follow symlinks
34
+ dir=$(readlink -e $dir || true)
35
+
36
+ # Ignore inexistent directories
37
+ if ! test -d "$dir" ; then
38
+ return
39
+ fi
40
+
41
+ # Detect possible candidates
42
+ files=$(ls $dir | egrep '^(ld|lib(d|c|m|pthread|rt|dl))-2.*.so' 2>/dev/null || true)
43
+ if test -z "$files" ; then
44
+ return
45
+ fi
46
+
47
+ for file in $files ; do
48
+ lib=$dir/$file
49
+
50
+ # Skip if it is a symlink (as installed by lsb-core)
51
+ if test -L "$lib" ; then
52
+ continue
53
+ fi
54
+
55
+ # Skip if it is the currently dynamic loader
56
+ if test "$lib" = "$ldfile" ; then
57
+ continue
58
+ fi
59
+
60
+ # See if the found libraries are compatible with the system ld.so;
61
+ # if they aren't, they'll be ignored. Check e_ident, e_type (which
62
+ # will just be ET_DYN), and e_machine. If a match is found, there
63
+ # is a risk of breakage.
64
+ libbytes=`head -c 20 $lib | od -c`
65
+ if test "$ldbytes" != "$libbytes" ; then
66
+ continue
67
+ fi
68
+
69
+ # Binaries owned packages are considered to do the right thing
70
+ # First try a quick lookup which should catch all cases on a
71
+ # normal system
72
+ if echo $libcfiles | grep -q "[ ^]$lib[ $]" ; then
73
+ continue
74
+ fi
75
+
76
+ # Slower lookup to confirm
77
+ if dpkg-query -S "$lib" >/dev/null 2>&1 ; then
78
+ continue
79
+ fi
80
+
81
+ # Output an error message and exit
82
+ echo
83
+ echo "A copy of the C library was found $msg:"
84
+ echo " '$lib'"
85
+ echo "It is not safe to upgrade the C library in this situation;"
86
+ echo "please remove that copy of the C library or get it out of"
87
+ echo "'$dir' and try again."
88
+ echo
89
+ exit 1
90
+ done
91
+ }
92
+
93
+ if [ -n "$preversion" ] && dpkg --compare-versions "$preversion" lt 2.31-0ubuntu2; then
94
+ LDCONFIG_NOTRIGGER=y
95
+ export LDCONFIG_NOTRIGGER
96
+ ldconfig || ldconfig --verbose
97
+ fi
98
+
99
+ if [ "$type" != abort-upgrade ]
100
+ then
101
+ # Load debconf module if available and usable
102
+ if [ -f /usr/share/debconf/confmodule ] && \
103
+ ( [ "$DEBCONF_USE_CDEBCONF" ] || perl -e "" 2>/dev/null ) ; then
104
+ . /usr/share/debconf/confmodule
105
+ USE_DEBCONF=1
106
+ fi
107
+
108
+ # See if LD_LIBRARY_PATH contains the traditional /lib, but not the
109
+ # multiarch path
110
+ dirs=$(echo $LD_LIBRARY_PATH | sed 's/:/ /g')
111
+ for dir in $dirs ; do
112
+ dir=$(readlink -e $dir || true)
113
+ case "$dir" in
114
+ /lib)
115
+ seen_traditional=1
116
+ ;;
117
+ /lib/x86_64-linux-gnu)
118
+ seen_multiarch=1
119
+ ;;
120
+ esac
121
+ done
122
+ if test -n "$seen_traditional" && test -z "$seen_multiarch" ; then
123
+ echo
124
+ echo "LD_LIBRARY_PATH contains the traditional /lib directory,"
125
+ echo "but not the multiarch directory /lib/x86_64-linux-gnu."
126
+ echo "It is not safe to upgrade the C library in this situation;"
127
+ echo "please remove the /lib/directory from LD_LIBRARY_PATH and"
128
+ echo "try again."
129
+ echo
130
+ exit 1
131
+ fi
132
+
133
+ # glibc kernel version check
134
+ system=`uname -s`
135
+ if [ "$system" = "Linux" ]
136
+ then
137
+ # sanity checking for the appropriate kernel on each architecture.
138
+ kernel_ver=`uname -r`
139
+ case ${DPKG_MAINTSCRIPT_ARCH} in
140
+ *)
141
+ # The GNU libc requires a >= 3.2 kernel, found in wheezy
142
+ kernel_ver_min=3.2
143
+ kernel_ver_rec=3.2
144
+ ;;
145
+ esac
146
+
147
+ if linux_compare_versions "$kernel_ver" lt $kernel_ver_min
148
+ then
149
+ if [ "$USE_DEBCONF" ]
150
+ then
151
+ db_version 2.0
152
+ db_fset glibc/kernel-too-old seen false
153
+ db_reset glibc/kernel-too-old
154
+ db_subst glibc/kernel-too-old kernel_ver $kernel_ver_rec
155
+ db_input critical glibc/kernel-too-old || true
156
+ db_go
157
+ db_stop
158
+ else
159
+ echo "ERROR: This version of the GNU libc requires kernel version"
160
+ echo "$kernel_ver_rec or later. Please upgrade your kernel before installing"
161
+ echo "glibc."
162
+ echo
163
+ fi
164
+ exit 1
165
+ fi
166
+
167
+ if linux_compare_versions "$kernel_ver" lt $kernel_ver_rec
168
+ then
169
+ if [ "$USE_DEBCONF" ]
170
+ then
171
+ db_version 2.0
172
+ db_fset glibc/kernel-not-supported seen false
173
+ db_reset glibc/kernel-not-supported
174
+ db_subst glibc/kernel-not-supported kernel_ver $kernel_ver_rec
175
+ db_input critical glibc/kernel-not-supported || true
176
+ db_go
177
+ db_stop
178
+ else
179
+ echo "WARNING: This version of the GNU libc requires kernel version"
180
+ echo "$kernel_ver_rec or later. Older versions might work but are not officially"
181
+ echo "supported. Please consider upgrading your kernel."
182
+ echo
183
+ fi
184
+ fi
185
+
186
+ elif [ $system = "GNU/kFreeBSD" ]
187
+ then
188
+ kernel_ver=`uname -r`
189
+ kernel_ver_min=8.3
190
+ if kfreebsd_compare_versions "$kernel_ver" lt $kernel_ver_min
191
+ then
192
+ if [ "$USE_DEBCONF" ]
193
+ then
194
+ db_version 2.0
195
+ db_version 2.0
196
+ db_fset glibc/kernel-too-old seen false
197
+ db_reset glibc/kernel-too-old
198
+ db_subst glibc/kernel-too-old kernel_ver $kernel_ver_min
199
+ db_input critical glibc/kernel-too-old || true
200
+ db_go
201
+ db_stop
202
+ else
203
+ echo "ERROR: This version of the GNU libc requires kernel version"
204
+ echo "$kernel_ver_min or later. Please upgrade your kernel before installing"
205
+ echo "glibc."
206
+ echo
207
+ fi
208
+ exit 1
209
+ fi
210
+ fi
211
+ fi
212
+
213
+ if [ "$type" = upgrade ]
214
+ then
215
+ # Try to detect copies of the libc library in the various places
216
+ # the dynamic linker uses.
217
+ ldfile=$(readlink -m /lib64/ld-linux-x86-64.so.2)
218
+ if test -f "$file"; then
219
+ ldbytes=$(head -c 20 /lib64/ld-linux-x86-64.so.2 | od -c)
220
+ else
221
+ # If the symlink to the dynamic linker is dangling or missing, set
222
+ # ldbytes to an empty string, the test below will fail and all the
223
+ # libraries found will be ignored.
224
+ ldbytes=""
225
+ fi
226
+ libcfiles=$(dpkg-query -L ${DPKG_MAINTSCRIPT_PACKAGE}:${DPKG_MAINTSCRIPT_ARCH} 2>/dev/null)
227
+
228
+ dirs="/lib/x86_64-linux-gnu /lib /lib/tls /lib32 /lib64 /usr/local/lib /usr/local/lib32 /usr/local/lib64"
229
+ for dir in $dirs ; do
230
+ check_dir "in an unexpected directory" $dir
231
+ done
232
+
233
+ if test -n "$LD_LIBRARY_PATH"; then
234
+ dirs=$(echo $LD_LIBRARY_PATH | sed 's/:/ /g')
235
+ for dir in $dirs ; do
236
+ check_dir "via LD_LIBRARY_PATH" $dir
237
+ done
238
+ fi
239
+
240
+ if test -e /etc/ld.so.conf; then
241
+ dirs=$(echo $(cat /etc/ld.so.conf))
242
+ if test -n "$dirs" ; then
243
+ for dir in $dirs ; do
244
+ check_dir "via /etc/ld.so.conf" $dir
245
+ done
246
+ fi
247
+ fi
248
+
249
+ if [ -e /lib/tls/i686/cmov/libc.so.6 ] || [ -e /lib/i686/cmov/libc.so.6 ] ; then
250
+ status_i686=$(dpkg -s libc6-i686 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
251
+ status_xen=$(dpkg -s libc6-xen 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
252
+ if ([ -z "$status_i686" ] || [ "$status_i686" = "not-installed" ] || [ "$status_i686" = "config-files" ]) && \
253
+ ([ -z "$status_xen" ] || [ "$status_xen" = "not-installed" ] || [ "$status_xen" = "config-files" ]); then
254
+ echo
255
+ echo "A non-dpkg owned copy of the libc6-i686 package was found."
256
+ echo "It is not safe to upgrade the C library in this situation;"
257
+ echo "please remove that copy of the C library and try again."
258
+ echo
259
+ exit 1
260
+ fi
261
+ fi
262
+
263
+ if [ -n "$preversion" ] && [ -x "$(which ischroot)" ] && ! ischroot; then
264
+ # NSS authentication trouble guard
265
+ if dpkg --compare-versions "$preversion" lt 2.31; then
266
+ if pidof xscreensaver xlockmore >/dev/null; then
267
+ if [ "$USE_DEBCONF" ] ; then
268
+ db_version 2.0
269
+ db_reset glibc/disable-screensaver
270
+ db_input critical glibc/disable-screensaver || true
271
+ db_go || true
272
+ else
273
+ echo "xscreensaver and xlockmore must be restarted before upgrading"
274
+ echo
275
+ echo "One or more running instances of xscreensaver or xlockmore have been"
276
+ echo "detected on this system. Because of incompatible library changes, the"
277
+ echo "upgrade of the GNU C library will leave you unable to authenticate to"
278
+ echo "these programs. You should arrange for these programs to be restarted"
279
+ echo "or stopped before continuing this upgrade, to avoid locking your users"
280
+ echo "out of their current sessions."
281
+ echo
282
+ frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
283
+ if [ "$frontend" = noninteractive ]; then
284
+ echo "Non-interactive mode, upgrade glibc forcibly"
285
+ else
286
+ echo -n "Press a key to continue"
287
+ read answer
288
+ fi
289
+ echo
290
+ fi
291
+ fi
292
+
293
+ check="kdm postgresql xdm"
294
+ # the following substitution processes the check variable
295
+ # and returns results in the services variable
296
+ # NSS services check:
297
+ echo -n "Checking for services that may need to be restarted..."
298
+ # Only get the ones that are installed, of the same architecture
299
+ # as libc (or arch all) and configured
300
+ [ -n "$check" ] && check=$(dpkg-query -W -f='${binary:Package} ${Status} ${Architecture}\n' $check 2> /dev/null | \
301
+ grep -E "installed (all|${DPKG_MAINTSCRIPT_ARCH})$" | sed 's/[: ].*//')
302
+ # some init scripts don't match the package names
303
+ check=$(echo $check | \
304
+ sed -e's/\bat\b/atd/g' \
305
+ -e's/\bdovecot-common\b/dovecot/g' \
306
+ -e's/\bexim4-base\b/exim4/g' \
307
+ -e's/\blpr\b/lpd/g' \
308
+ -e's/\blpr-ppd\b/lpd-ppd/g' \
309
+ -e's/\bmysql-server\b/mysql/g' \
310
+ -e's/\bsasl2-bin\b/saslauthd/g' \
311
+ -e's/\bsamba\b/smbd/g' \
312
+ -e's/\bpostgresql-common\b/postgresql/g' \
313
+ )
314
+ echo
315
+ echo "Checking init scripts..."
316
+ for service in $check; do
317
+ invoke-rc.d ${service} status >/dev/null 2>/dev/null && status=0 || status=$?
318
+ if [ "$status" = "0" ] || [ "$status" = "2" ] ; then
319
+ services="$service $services"
320
+ elif [ "$status" = "100" ] ; then
321
+ echo "WARNING: init script for $service not found."
322
+ fi
323
+ done
324
+
325
+ if [ -n "$services" ]; then
326
+ if [ "$USE_DEBCONF" ] ; then
327
+ db_version 2.0
328
+ db_reset glibc/upgrade
329
+ db_subst glibc/upgrade services $services
330
+ if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then
331
+ db_input medium glibc/upgrade || true
332
+ else
333
+ db_input critical glibc/upgrade || true
334
+ fi
335
+ db_go || true
336
+ db_get glibc/upgrade
337
+ answer=$RET
338
+ else
339
+ echo "Do you want to upgrade glibc now?"
340
+ echo
341
+ echo "Running services and programs that are using NSS need to be restarted,"
342
+ echo "otherwise they might not be able to do lookup or authentication any more."
343
+ echo "The installation process is able to restart some services (such as ssh or"
344
+ echo "telnetd), but other programs cannot be restarted automatically. One such"
345
+ echo "program that needs manual stopping and restart after the glibc upgrade by"
346
+ echo "yourself is xdm - because automatic restart might disconnect your active"
347
+ echo "X11 sessions."
348
+ echo
349
+ echo "This script detected the following installed services which must be"
350
+ echo "stopped before the upgrade: $services"
351
+ echo
352
+ echo "If you want to interrupt the upgrade now and continue later, please"
353
+ echo "answer No to the question below."
354
+ echo
355
+ frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
356
+ if [ "$frontend" = noninteractive ]; then
357
+ echo "Non-interactive mode, upgrade glibc forcibly"
358
+ answer=true
359
+ else
360
+ echo -n "Do you want to upgrade glibc now? [Y/n] "
361
+ read answer
362
+ case $answer in
363
+ Y*|y*) answer=true ;;
364
+ N*|n*) answer=false ;;
365
+ *) answer=true ;;
366
+ esac
367
+ fi
368
+ echo
369
+ fi
370
+
371
+ if [ "x$answer" != "xtrue" ]; then
372
+ echo "Stopped glibc upgrade. Please retry the upgrade after you have"
373
+ echo "checked or stopped services by hand."
374
+ exit 1
375
+ fi
376
+ fi
377
+
378
+ services=""
379
+ check="apache2 apache apache-ssl apache-perl autofs at"
380
+ check="$check boa cucipop courier-authdaemon cron cups exim"
381
+ check="$check exim4-base dovecot-common cucipop incron lprng lpr"
382
+ check="$check lpr-ppd mysql-server nis openbsd-inetd"
383
+ check="$check openldapd postgresql-common proftpd postfix postfix-tls"
384
+ check="$check rsync samba sasl2-bin slapd smail sendmail snmpd ssh"
385
+ check="$check spamassassin vsftpd wu-ftpd wu-ftpd-academ wwwoffle"
386
+ check="$check webmin dropbear gdm gdm3"
387
+ # the following substitution processes the check variable
388
+ # and returns results in the services variable
389
+ # NSS services check:
390
+ echo -n "Checking for services that may need to be restarted..."
391
+ # Only get the ones that are installed, of the same architecture
392
+ # as libc (or arch all) and configured
393
+ [ -n "$check" ] && check=$(dpkg-query -W -f='${binary:Package} ${Status} ${Architecture}\n' $check 2> /dev/null | \
394
+ grep -E "installed (all|${DPKG_MAINTSCRIPT_ARCH})$" | sed 's/[: ].*//')
395
+ # some init scripts don't match the package names
396
+ check=$(echo $check | \
397
+ sed -e's/\bat\b/atd/g' \
398
+ -e's/\bdovecot-common\b/dovecot/g' \
399
+ -e's/\bexim4-base\b/exim4/g' \
400
+ -e's/\blpr\b/lpd/g' \
401
+ -e's/\blpr-ppd\b/lpd-ppd/g' \
402
+ -e's/\bmysql-server\b/mysql/g' \
403
+ -e's/\bsasl2-bin\b/saslauthd/g' \
404
+ -e's/\bsamba\b/smbd/g' \
405
+ -e's/\bpostgresql-common\b/postgresql/g' \
406
+ )
407
+ echo
408
+ echo "Checking init scripts..."
409
+ for service in $check; do
410
+ invoke-rc.d ${service} status >/dev/null 2>/dev/null && status=0 || status=$?
411
+ if [ "$status" = "0" ] || [ "$status" = "2" ] ; then
412
+ services="$service $services"
413
+ elif [ "$status" = "100" ] ; then
414
+ echo "WARNING: init script for $service not found."
415
+ fi
416
+ done
417
+
418
+ if [ -n "$services" ]; then
419
+ if [ "$USE_DEBCONF" ] ; then
420
+ db_version 2.0
421
+ if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then
422
+ db_input medium libraries/restart-without-asking || true
423
+ else
424
+ db_input critical libraries/restart-without-asking || true
425
+ fi
426
+ db_go || true
427
+
428
+ db_get libraries/restart-without-asking
429
+ if [ "$RET" != true ]; then
430
+ db_reset glibc/restart-services
431
+ db_set glibc/restart-services "$services"
432
+ if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then
433
+ db_input medium glibc/restart-services || true
434
+ else
435
+ db_input critical glibc/restart-services || true
436
+ fi
437
+ db_go || true
438
+ db_get glibc/restart-services
439
+ services="$RET"
440
+ fi
441
+ else
442
+ echo
443
+ echo "Name Service Switch update in the C Library: post-installation question."
444
+ echo
445
+ echo "Running services and programs that are using NSS need to be restarted,"
446
+ echo "otherwise they might not be able to do lookup or authentication any more"
447
+ echo "(for services such as ssh, this can affect your ability to login)."
448
+ echo "Note: restarting sshd/telnetd should not affect any existing connections."
449
+ echo
450
+ echo "The services detected are: "
451
+ echo " $services"
452
+ echo
453
+ echo "If other services have begun to fail mysteriously after this upgrade, it is"
454
+ echo "probably necessary to restart them too. We recommend that you reboot your"
455
+ echo "machine after the upgrade to avoid NSS-related troubles."
456
+ echo
457
+ frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
458
+ if [ "$frontend" = noninteractive ]; then
459
+ echo "Non-interactive mode, restarting services"
460
+ answer=yes
461
+ else
462
+ echo -n "Do you wish to restart services? [Y/n] "
463
+ read answer
464
+ case $answer in
465
+ N*|n*) services="" ;;
466
+ *) ;;
467
+ esac
468
+ fi
469
+ fi
470
+
471
+ if [ -n "$services" ]; then
472
+ echo "Stopping some services possibly affected by the upgrade (will be restarted later):"
473
+ for service in $services; do
474
+ case "$service" in
475
+ cron)
476
+ # See bug (LP: #508083)
477
+ echo -n " $service: stopping..."
478
+ if invoke-rc.d ${service} stop > /dev/null 2>&1; then
479
+ echo "done."
480
+ echo "$service" >> /var/run/services.need_start
481
+ else
482
+ echo "FAILED! ($?)"
483
+ echo "$service" >> /var/run/services.need_restart
484
+ fi
485
+ ;;
486
+
487
+ *)
488
+ # log service details to allow postinst to handle the
489
+ # restart.
490
+ echo "$service" >> /var/run/services.need_restart
491
+ ;;
492
+ esac
493
+ done
494
+
495
+ fi
496
+ echo
497
+ else
498
+ echo "Nothing to restart."
499
+ fi
500
+ fi # end upgrading and $preversion lt 2.31
501
+ fi # Upgrading
502
+
503
+ # This will keep us from using hwcap libs (optimized) during an
504
+ # upgrade.
505
+ touch /etc/ld.so.nohwcap
506
+ fi
507
+
508
+
509
+
510
+ if [ -n "$preversion" ]; then
511
+ if dpkg --compare-versions "$preversion" lt 2.31; then
512
+ # unconditionally wipe ld.so.cache on major version upgrades; this
513
+ # makes those upgrades a bit slower, but is less error-prone than
514
+ # hoping we notice every time the cache format is changed upstream
515
+ rm -f /etc/ld.so.cache
516
+ rm -f /var/cache/ldconfig/aux-cache
517
+ fi
518
+ fi
519
+
520
+ exit 0