#76 Hier à 16:05
- jnq
Re : Erreur 139 lors de la suppression de paquets
quero@quero-X455LJ:~$ cat -n /usr/share/initramfs-tools/hooks/plymouth
1 #!/bin/sh
2
3 set -e
4
5 OPTION=FRAMEBUFFER
6 PREREQ=""
7
8 prereqs()
9 {
10 echo "${PREREQ}"
11 }
12
13 case "${1}" in
14 prereqs)
15 prereqs
16 exit 0
17 ;;
18 esac
19
20 . /usr/share/initramfs-tools/hook-functions
21
22 THEME_PATH="$(update-alternatives --query default.plymouth 2>/dev/null | sed -e '/^Value:/!d' -e 's/^Value: \(.*\)/\1/')"
23 THEME="$(basename ${THEME_PATH:-none} .plymouth || true)"
24 THEMES="/usr/share/plymouth/themes"
25
26 if [ -n "${THEME_PATH}" ]; then
27 IMAGE_PATH=$(grep "ImageDir *= *" ${THEME_PATH} | sed 's/ImageDir *= *//')
28 fi
29
30 if [ -n "${IMAGE_PATH}" ] && [ "${THEME_PATH}" != "${IMAGE_PATH}" ]; then
31 IMAGE_NAME="$(basename ${IMAGE_PATH:-none})"
32 fi
33
34 mkdir -p "${DESTDIR}/${THEMES}"
35
36 if [ -n "${THEME}" ] && [ "${THEME}" != "none" ]
37 then
38 THEME_NAME="${THEME}"
39 THEME="${THEMES}/${THEME}/${THEME}.plymouth"
40 # create default theme symlink
41 ln -s "${THEME}" "${DESTDIR}/${THEMES}/default.plymouth"
42 fi
43
44 PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
45
46 # default text theme alternative
47 TEXTTHEME_PATH="$(update-alternatives --query text.plymouth 2>/dev/null | sed -e '/^Value:/!d' -e 's/^Value: \(.*\)/\1/')"
48 TEXTTHEME="$(basename ${TEXTTHEME_PATH:-none} .plymouth || true)"
49
50 if [ -n "${TEXTTHEME}" ] & [ "${TEXTTHEME}" != "none" ]
51 then
52 TEXTTHEME_NAME="${TEXTTHEME}"
53 TEXTTHEME="${THEMES}/${TEXTTHEME}/${TEXTTHEME}.plymouth"
54 # create default text theme symlink
55 ln -s "${TEXTTHEME}" "${DESTDIR}/${THEMES}/text.plymouth"
56 fi
57
58 # ensure we at least have one theme configured
59 if [ ! -r "${THEME}" ] && [ ! -r "${TEXTTHEME}" ]
60 then
61 exit 0
62 fi
63
64 # copy base themes content
65 currthemes="${THEME_NAME} ${TEXTTHEME_NAME} ${IMAGE_NAME}"
66 for currtheme in $currthemes
67 do
68 case "${currtheme}" in
69 text|details|tribar|ubuntu-text)
70 PLUGINS="text.so details.so"
71 ;;
72
73 *)
74 PLUGINS="details.so label-pango.so"
75 ;;
76 esac
77
78 MODULE="${PLUGIN_PATH}/$(sed -n 's/^ModuleName=\(.*\)/\1/p' ${THEMES}/${currtheme}/${currtheme}.plymouth 2>/dev/null || true).so"
79
80 if [ ! -e "$MODULE" ]
81 then
82 echo "W: plymouth module ($MODULE) missing, skipping that theme."
83 continue
84 fi
85
86 # copy plugin and images for current theme
87 copy_exec "${MODULE}"
88 cp -a "${THEMES}/${currtheme}" "${DESTDIR}/${THEMES}"
89
90 # copy base plugins if any
91 for PLUGIN in ${PLUGINS}
92 do
93 if [ -f ${PLUGIN_PATH}/${PLUGIN} ]
94 then
95 copy_exec ${PLUGIN_PATH}/${PLUGIN}
96 else
97 echo "W: plymouth: The plugin ${PLUGIN} is missing, the selected theme might not work as expected."
98 echo "W: plymouth: You might want to install the plymouth-themes and plymouth-label package to fix this."
99 fi
100 done
101
102 done
103
104 # copy binaries and base plugins
105 copy_exec /usr/bin/plymouth
106 copy_exec /usr/sbin/plymouthd
107 copy_exec /usr/libexec/plymouth/plymouthd-fd-escrow
108
109 # copy base themes and logo
110 cp -dRp "${THEMES}/details" "${DESTDIR}/${THEMES}"
111 cp -dRp "${THEMES}/text" "${DESTDIR}/${THEMES}"
112
113 if [ -f /etc/os-release ]
114 then
115 cp /etc/os-release "${DESTDIR}/etc"
116 fi
117
118 case "${THEME_NAME}" in
119 ""|ubuntu-text|text|details)
120
121 ;;
122
123 *)
124 if [ -d ${DESTDIR}/usr/share/plymouth/themes/spinner ]; then
125 cp /usr/share/plymouth/themes/spinner/watermark.png "${DESTDIR}/usr/share/plymouth/themes/spinner/watermark.png"
126 fi
127
128 # fontconfig
129 mkdir -p "${DESTDIR}/etc/fonts/conf.d"
130 cp -dRp /etc/fonts/fonts.conf "${DESTDIR}/etc/fonts"
131 mkdir -p "${DESTDIR}/var/cache/fontconfig"
132 # This is only needed because fc-cache bellow fails if the directory doesn't exist
133 mkdir -p "${DESTDIR}/usr/local/share/fonts"
134
135 # Make Ubuntu the default sans-serif, and mono fonts. Ubuntu
136 # font is always present if we have python-label installed; if
137 # not installed, then we have no graphical themes that display
138 # text, so that's ok.
139
140 ubuntu_wght='/usr/share/fonts/truetype/ubuntu/Ubuntu[wdth,wght].ttf'
141 ubuntu_wght_mono='/usr/share/fonts/truetype/ubuntu/UbuntuMono[wght].ttf'
142 ubuntu_wght_monoitalic='/usr/share/fonts/truetype/ubuntu/UbuntuMono-Italic[wght].ttf'
143 if [ -e "$ubuntu_wght" ]; then
144 sed 's|\(<family>DejaVu Sans</family>\)|<family>Ubuntu</family>\1|;s|\(<family>DejaVu Sans Mono</family>\)|<family>Ubuntu Mono</family>\1|;' \
145 /etc/fonts/conf.d/60-latin.conf > "${DESTDIR}/etc/fonts/conf.d/60-latin.conf"
146 mkdir -p "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
147 cp -a "$ubuntu_wght" "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
148 cp -a "$ubuntu_wght_mono" "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
149 cp -a "$ubuntu_wght_monoitalic" "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
150 elif [ -e /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf ]; then
151 sed 's|\(<family>DejaVu Sans</family>\)|<family>Ubuntu</family>\1|;s|\(<family>DejaVu Sans Mono</family>\)|<family>Ubuntu Mono</family>\1|;' \
152 /etc/fonts/conf.d/60-latin.conf > "${DESTDIR}/etc/fonts/conf.d/60-latin.conf"
153 mkdir -p "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
154 cp -a /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
155 cp -a /usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
156 fi
157 fc-cache -s -y "${DESTDIR}" > /dev/null 2>&1
158
159 # copy /etc/default/keyboard (needed for keymap detection)
160 if [ -e /etc/default/keyboard ]
161 then
162 mkdir -p "${DESTDIR}/etc/default"
163 cp /etc/default/keyboard "${DESTDIR}/etc/default"
164 fi
165
166 ;;
167 esac
168
169 # copy renderers
170 copy_exec /usr/lib/x86_64-linux-gnu/plymouth/renderers/frame-buffer.so
171 copy_exec /usr/lib/x86_64-linux-gnu/plymouth/renderers/drm.so
172
173 # copy config files
174 mkdir -p "${DESTDIR}/etc/plymouth"
175
176 if [ -r /etc/plymouth/plymouthd.conf ]
177 then
178 cp -dRp /etc/plymouth/plymouthd.conf "${DESTDIR}/etc/plymouth/"
179 fi
180
181 # copy defaults file if exist
182 if [ -r /usr/share/plymouth/plymouthd.defaults ]
183 then
184 cp -dRp /usr/share/plymouth/plymouthd.defaults "${DESTDIR}/usr/share/plymouth/"
185 fi
186
187 # temporarily include dummy root account lookup (#691598)
188 if ! grep -qs '^root:' "${DESTDIR}/etc/passwd"
189 then
190 echo "root:x:0:0:root:/root:/bin/sh" >> "${DESTDIR}/etc/passwd"
191 fi
192
193 if ! grep -qs '^passwd: files' "${DESTDIR}/etc/nsswitch.conf"
194 then
195 echo "passwd: files" >> "${DESTDIR}/etc/nsswitch.conf"
196 fi
197
198 for _LIBRARY in /lib/x86_64-linux-gnu/libnss_files*
199 do
200 if [ -e "${_LIBRARY}" ]
201 then
202 copy_exec "${_LIBRARY}"
203 fi
204 done
quero@quero-X455LJ:~$
Ubuntu 24.04.3 LTS
Hors ligne
#77 Hier à 16:06
- jnq
Re : Erreur 139 lors de la suppression de paquets
uero@quero-X455LJ:~$ sudo mv /usr/share/initramfs-tools/hooks/plymouth $HOME
[sudo] Mot de passe de quero :
quero@quero-X455LJ:~$
Ubuntu 24.04.3 LTS
Hors ligne
#78 Hier à 16:07
- jnq
Re : Erreur 139 lors de la suppression de paquets
uero@quero-X455LJ:~$ sudo apt upgrade
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances... Fait
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
quero@quero-X455LJ:~$
Ubuntu 24.04.3 LTS
Hors ligne
#79 Hier à 16:09
- jnq
Re : Erreur 139 lors de la suppression de paquets
Bonjour, Le problème n'est présent que sur mon ordinateur portable. Le fixe lui n'a aucun problème.
Ubuntu 24.04.3 LTS
Hors ligne