Lines 262-267
Link Here
|
262 |
dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
262 |
dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
263 |
} |
263 |
} |
264 |
|
264 |
|
|
|
265 |
migrate_locale() { |
266 |
local envd_locale="${EROOT%/}/etc/env.d/02locale" |
267 |
local locale_conf="${EROOT%/}/etc/locale.conf" |
268 |
|
269 |
if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
270 |
if [[ -e ${envd_locale} ]]; then |
271 |
# 02locale exists, but locale.conf does not; move it. |
272 |
ebegin "Moving ${envd_locale} to ${locale_conf}" |
273 |
mv "${envd_locale}" "${locale_conf}" |
274 |
eend $? |
275 |
else |
276 |
# Otherwise, create a dummy file |
277 |
ebegin "Creating ${locale_conf}" |
278 |
cat > "${locale_conf}" <<-EOF |
279 |
# This file has been generated by the sys-apps/systemd ebuild. |
280 |
# See locale.conf(5) and localectl(1). |
281 |
EOF |
282 |
eend $? |
283 |
fi |
284 |
fi |
285 |
|
286 |
if [[ ! -L ${envd_locale} ]]; then |
287 |
if [[ -e ${envd_locale} ]]; then |
288 |
# 02locale exists, but is not a symlink; warn the user. |
289 |
# This should only happen if locale.conf also exists, or if the mv command failed. |
290 |
ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
291 |
ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
292 |
ewarn "and create the symlink with the following command:" |
293 |
ewarn "ln -snf ../locale.conf ${envd_locale}" |
294 |
else |
295 |
# Otherwise, create the symlink. |
296 |
ebegin "Creating ${envd_locale} -> ../locale.conf symlink" |
297 |
ln -s ../locale.conf "${envd_locale}" |
298 |
eend $? |
299 |
fi |
300 |
|
301 |
fi |
302 |
} |
303 |
|
265 |
pkg_postinst() { |
304 |
pkg_postinst() { |
266 |
# for udev rules |
305 |
# for udev rules |
267 |
enewgroup dialout |
306 |
enewgroup dialout |
Lines 286-291
Link Here
|
286 |
# Bug 468876 |
325 |
# Bug 468876 |
287 |
fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt |
326 |
fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt |
288 |
|
327 |
|
|
|
328 |
# Bug 465468 |
329 |
migrate_locale |
330 |
|
289 |
if [[ ! -L "${ROOT}"/etc/mtab ]]; then |
331 |
if [[ ! -L "${ROOT}"/etc/mtab ]]; then |
290 |
ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." |
332 |
ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." |
291 |
ewarn "Not having it is not supported by upstream and will cause tools like 'df'" |
333 |
ewarn "Not having it is not supported by upstream and will cause tools like 'df'" |