blob: d738e188db8c45cf4b76409a72f7bf51d20aaaeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
--- 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
|