mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
--- a/restart-services.orig
|
|
+++ b/restart-services
|
|
@@ -380,7 +380,7 @@
|
|
done
|
|
# lib_users <= 0.12 reports postgres' "/anon_hugepage" as deleted lib, so tell it to ignore this manually (see bug #648356)
|
|
# bug #678500: ignore tmp-files
|
|
-done < <(lib_users -m -I /anon_hugepage -i '/tmp/*')
|
|
+done < <(lib_users.py -m -I /anon_hugepage -i '/tmp/*')
|
|
|
|
debug "analyzing remaining processes (not direct hits) ..."
|
|
debug "TODO_PROCESSES_EXE: ${TODO_PROCESSES_EXE[*]}"
|
|
@@ -422,7 +422,7 @@
|
|
EXEC_PATH_RE="/(usr/)?((s)?bin|lib(32|64|exec))?/"
|
|
if [[ $s =~ $EXEC_PATH_RE ]]; then
|
|
debug "'$s' may be script, looking for package"
|
|
- if PKG=$(qfile --nocolor -- "$s"|awk '{print $1}'); then
|
|
+ if PKG=$(apk info --who-owns --no-progress -- "$s"|awk '{print $1}'); then
|
|
debug "bingo. '$s' belongs to a package"
|
|
break
|
|
fi
|
|
@@ -431,19 +431,13 @@
|
|
fi
|
|
else
|
|
debug "process does not look like a script"
|
|
- PKG=$(qfile --nocolor -- "$lu_exe"|awk '{print $1}')
|
|
+ PKG=$(apk info --who-owns --no-progress -- "$lu_exe"|awk '{print $1}')
|
|
fi
|
|
|
|
if [[ $PKG ]]; then
|
|
debug "found package: $PKG"
|
|
|
|
- # some processes have their init scripts in a seperate package :-/
|
|
- # so as a last resort we add hardcoded well known cases
|
|
- case $PKG in
|
|
- dev-lang/php) PKG="app-admin/eselect-php" ;;
|
|
- esac
|
|
-
|
|
- _init_scripts=( $(qlist -e $PKG|grep /etc/init.d/|paste -s -d" ") )
|
|
+ _init_scripts=( $(apk info -L "${PKG}-openrc"|grep /etc/init.d/|paste -s -d" ") )
|
|
if [[ ${#_init_scripts} -gt 0 ]]; then
|
|
debug "found init scripts: ${_init_scripts[*]}"
|
|
for i in "${_init_scripts[@]}"; do
|
|
|